コード例 #1
0
ファイル: host_mcu_interface_rx.c プロジェクト: Btar/HEXIWEAR
/**
 *    Host MCU Interface Rx task
 *    @param   param   initialData
 */
static void HostInterface_RxTask( task_param_t param )
{
  hostInterface_packet_t
    tmpPkt;

  while (1)
  {
    osa_status_t
      status = HostInterface_RxQueueMsgGet( &tmpPkt );

    if ( kStatus_OSA_Success == status )
    {
#ifdef gHostInterface_TxConfirmationEnable
      // acknowledge the packet reception

      if ( 1 == ( tmpPkt.start2 & 0x01 ) )
      {
    	  HostInterface_EventSendOkPacketSet();
      }
#endif

      // handle the packet's content
      packetHandler(&tmpPkt);
    }
  }
}
コード例 #2
0
static void HostInterface_RxHandlerTask(task_param_t param)
{
    
    osaStatus_t status;
    
    
    while(1)
    {
        status = HostInterface_RxQueueMsgGet(&tmpHostInterface_packet);
        if(status == osaStatus_Success)
        {
#ifdef gHostInterface_TxConfirmationEnable //.....................
            HostInterface_EventSendOkPacketSet();
#endif //..........................................................
            HostInterface_RxPacketHandler(&tmpHostInterface_packet);
        }
    }
    
}