base/ANTInterface.c
void ANTInterface_Init()
{
   UCHAR ucIndex;

   Serial_Init();              

   IOBoard_Init();

   // Register a dedicated timer for commands 
   stCommandTimeout.ucAlarmNumber = Timer_RegisterAlarm( CommandTimeout, ALARM_FLAG_ONESHOT);
   stCommandTimeout.stTimeoutStruct.usTimeout = ALARM_TIMER_PERIOD/2;   // 500ms

   for (ucIndex = 0; ucIndex < MAX_ACK_ALARMS_CHANNELS; ucIndex++)
   {
      astAckTimeouts[ucIndex].ucAlarmNumber = 0;
      ClearWait(&astAckTimeouts[ucIndex]);
   }                  


   //!! ASSERT ucAlarmNumber does not equal 0        
   ClearWait(&stCommandTimeout);
}
//------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
// ANTInterface_Init
//
// This function initialize the ANTInterface module
//
////////////////////////////////////////////////////////////////////////////////
ANTInterface_Init
This function initialize the ANTInterface module
ANTInterface_Init This function initialize the ANTInterface module
void ANTInterface_Init()
{
   UCHAR ucIndex;
   Serial_Init();              
   IOBoard_Init();
   stCommandTimeout.ucAlarmNumber = Timer_RegisterAlarm( CommandTimeout, ALARM_FLAG_ONESHOT);
   stCommandTimeout.stTimeoutStruct.usTimeout = ALARM_TIMER_PERIOD/2;   
   for (ucIndex = 0; ucIndex < MAX_ACK_ALARMS_CHANNELS; ucIndex++)
   {
      astAckTimeouts[ucIndex].ucAlarmNumber = 0;
      ClearWait(&astAckTimeouts[ucIndex]);
   }                  
   ClearWait(&stCommandTimeout);
}
void ANTInterface_Init ( ) { UCHAR ucIndex ; Serial_Init ( ) ; IOBoard_Init ( ) ; stCommandTimeout . ucAlarmNumber = Timer_RegisterAlarm ( CommandTimeout , ALARM_FLAG_ONESHOT ) ; stCommandTimeout . stTimeoutStruct . usTimeout = ALARM_TIMER_PERIOD / 2 ; for ( ucIndex = 0 ; ucIndex < MAX_ACK_ALARMS_CHANNELS ; ucIndex ++ ) { astAckTimeouts [ ucIndex ] . ucAlarmNumber = 0 ; ClearWait ( & astAckTimeouts [ ucIndex ] ) ; } ClearWait ( & stCommandTimeout ) ; }
ANTInterface_Init
This function initialize the ANTInterface module
ANTInterface_Init This function initialize the ANTInterface module
// Register a dedicated timer for commands  // 500ms //!! ASSERT ucAlarmNumber does not equal 0        