예제 #1
0
파일: relay.c 프로젝트: dab150/AccuLander
/**
 * 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)));
}
예제 #2
0
/**
  bool DRV_UART2_ReceiveBufferIsEmpty(void)
*/
bool DRV_UART2_ReceiveBufferIsEmpty(void)
{
    return(UART2_ReceiveBufferIsEmpty());
}