sensor/bsbc/bc_tx.c
BOOL BCTX_ChannelEvent(UCHAR* pucEventBuffer_, ANTPLUS_EVENT_RETURN* pstEventStruct_)
{
   BOOL bTransmit = FALSE;
   UCHAR ucChannel = pucEventBuffer_[BUFFER_INDEX_CHANNEL_NUM] & 0x1F;

   if (ucChannel == 0)
      bTransmit = FALSE;

   pstEventStruct_->eEvent = ANTPLUS_EVENT_NONE;
   
   if(ucChannel == ucAntChannel && pucEventBuffer_)
   {
      UCHAR ucANTEvent = pucEventBuffer_[BUFFER_INDEX_MESG_ID];   
      
      switch(ucANTEvent)
      {
         case MESG_RESPONSE_EVENT_ID:
         {
            switch(pucEventBuffer_[BUFFER_INDEX_RESPONSE_CODE])
            {
               case EVENT_RX_SEARCH_TIMEOUT:
               {
                  // Should handle the timeout at the application level
                  break;
               }
               case RESPONSE_NO_ERROR:
               {   
         
                  bTransmit = HandleResponseEvents(pucEventBuffer_);
                  break;
               }

               case EVENT_TX:
               {
                  bTransmit =  HandleDataMessages(pucEventBuffer_, pstEventStruct_);
                  break;
               }
               default:
               {
                  break;
               }
            }
         }   
      }
   }
   
   return(bTransmit);
}
////////////////////////////////////////////////////////////////////////////
// BCTX_ChannelEvent
//
// Process ANT channel event. 
//
// pucEventBuffer_: pointer to buffer containg data recieved from ANT
// pstEventStruct_: Pointer to event return structure
//
// !!IMPORTANT: If this function returns true, it means that there is 
// a pending message to transmit to ANT. Do not sleep thread.
//
// \return: TRUE if a packet is to be transmitted 
////////////////////////////////////////////////////////////////////////////
BCTX_ChannelEvent
Process ANT channel event.

pointer to buffer containg data recieved from ANT
pstEventStruct_: Pointer to event return structure

If this function returns true, it means that there is
a pending message to transmit to ANT. Do not sleep thread.

\return: TRUE if a packet is to be transmitted
BCTX_ChannelEvent Process ANT channel event . pointer to buffer containg data recieved from ANT pstEventStruct_ : Pointer to event return structure If this function returns true it means that there is a pending message to transmit to ANT . Do not sleep thread . \ return : TRUE if a packet is to be transmitted
BOOL BCTX_ChannelEvent(UCHAR* pucEventBuffer_, ANTPLUS_EVENT_RETURN* pstEventStruct_)
{
   BOOL bTransmit = FALSE;
   UCHAR ucChannel = pucEventBuffer_[BUFFER_INDEX_CHANNEL_NUM] & 0x1F;
   if (ucChannel == 0)
      bTransmit = FALSE;
   pstEventStruct_->eEvent = ANTPLUS_EVENT_NONE;
   if(ucChannel == ucAntChannel && pucEventBuffer_)
   {
      UCHAR ucANTEvent = pucEventBuffer_[BUFFER_INDEX_MESG_ID];   
      switch(ucANTEvent)
      {
         case MESG_RESPONSE_EVENT_ID:
         {
            switch(pucEventBuffer_[BUFFER_INDEX_RESPONSE_CODE])
            {
               case EVENT_RX_SEARCH_TIMEOUT:
               {
                  break;
               }
               case RESPONSE_NO_ERROR:
               {   
                  bTransmit = HandleResponseEvents(pucEventBuffer_);
                  break;
               }
               case EVENT_TX:
               {
                  bTransmit =  HandleDataMessages(pucEventBuffer_, pstEventStruct_);
                  break;
               }
               default:
               {
                  break;
               }
            }
         }   
      }
   }
   return(bTransmit);
}
BOOL BCTX_ChannelEvent ( UCHAR * pucEventBuffer_ , ANTPLUS_EVENT_RETURN * pstEventStruct_ ) { BOOL bTransmit = FALSE ; UCHAR ucChannel = pucEventBuffer_ [ BUFFER_INDEX_CHANNEL_NUM ] & 0x1F ; if ( ucChannel == 0 ) bTransmit = FALSE ; pstEventStruct_ -> eEvent = ANTPLUS_EVENT_NONE ; if ( ucChannel == ucAntChannel && pucEventBuffer_ ) { UCHAR ucANTEvent = pucEventBuffer_ [ BUFFER_INDEX_MESG_ID ] ; switch ( ucANTEvent ) { case MESG_RESPONSE_EVENT_ID : { switch ( pucEventBuffer_ [ BUFFER_INDEX_RESPONSE_CODE ] ) { case EVENT_RX_SEARCH_TIMEOUT : { break ; } case RESPONSE_NO_ERROR : { bTransmit = HandleResponseEvents ( pucEventBuffer_ ) ; break ; } case EVENT_TX : { bTransmit = HandleDataMessages ( pucEventBuffer_ , pstEventStruct_ ) ; break ; } default : { break ; } } } } } return ( bTransmit ) ; }
BCTX_ChannelEvent
Process ANT channel event.
BCTX_ChannelEvent Process ANT channel event .
// Should handle the timeout at the application level