/** * Relays data from Bluetooth to Radio */ void relayFromBluetooth() { /* UART1 - FTDI USB * UART2 - Bluetooth * UART3 - Radio */ if(!UART2_ReceiveBufferIsEmpty()) //New data on UART2 InjectLoop(UART2_Read()); //Reads data from UART2 and sends to injector //Lets see if there is some data available to send to radio if(!CircularBufferIsEmpty(&(inject.outBuff))) UART3_Write(CircularBufferDeque(&(inject.outBuff))); }
/** bool DRV_UART2_ReceiveBufferIsEmpty(void) */ bool DRV_UART2_ReceiveBufferIsEmpty(void) { return(UART2_ReceiveBufferIsEmpty()); }