示例#1
0
文件: app.c 项目: cwendt94/Embedded
void sendMsgToRover( void )
{
    struct MessageStruc value;
    if(seqNum == 250)
        seqNum = 0;
    if( pdTRUE == xQueueReceive( SendQueue, &value, 0 ))
    {
        DRV_USART0_WriteByte(252);
        DRV_USART0_WriteByte(seqNum);
        DRV_USART0_WriteByte(value.data);
        DRV_USART0_WriteByte(value.data2);
        DRV_USART0_WriteByte(value.data3);
        seqNum++;
    }
  /*  else
    {
        DRV_USART0_WriteByte(252);
        DRV_USART0_WriteByte(seqNum);
        DRV_USART0_WriteByte(0);
        DRV_USART0_WriteByte(0);
        DRV_USART0_WriteByte(0);
    }*/
}
示例#2
0
void DRV_USART_WriteByte( const DRV_HANDLE handle, const uint8_t byte)
{
    uintptr_t instance;

    instance = handle & 0x00FF;
    //As we are handling single client, only multiple instance is taken care.
    switch(instance)
    {
        case DRV_USART_INDEX_0:
        {
            DRV_USART0_WriteByte(byte);
            break;
        }
        default:
        {
            break;
        }
    }
}