base/serial.c
BOOL Serial_SyncReset(void)
{   
   SYNC_SMSGRDY_DEASSERT();
   // Add delay to wait for ANT module to finish power up and get ready for incoming messages
   // The current system setup results in a delay of ~1ms; a minimum of 0.5ms 
   // are required for ANT to properly reset.
   Timer_DelayTime(100);                               // 1 ms

   // perform the Synchronous serial reset as described in Interfacing with
   // ANT General Purpose Chipsets and Modules document

   // Assert SRDY (SRDY = 0)
   SYNC_SRDY_ASSERT();

   // make sure there is a 250us delay between SRDY falling edge and SMSGRDY falling edge
   Timer_DelayTime(30);                                // 300 us delay

   // Assert SMSGRDY (SMSGRDY = 0)
   SYNC_SMSGRDY_ASSERT();

   // Wait for ANT to lower SEN to indicate it is ready
   Timer_DelayTime(50000);                               // wait 500 ms

   sqTxMessages.ucHead = 0;                     //Reset the Tx queue
   sqTxMessages.ucTail = 0;
   sqTxMessages.ucMessageCount = 0;


   sqRxMessages.ucHead = 0;                     //Reset the Rx queue
   sqRxMessages.ucTail = 0;
   sqRxMessages.ucMessageCount = 0;
   sqRxMessages.bQueueOverflow = FALSE;

   // raise SRDY (SRDY = 1)
   SYNC_SRDY_DEASSERT();

   return IS_SEN_ASSERTED();
}
/////////////////////////////////////////////////////////////////////////////
// SyncSerial_SyncReset
//
// This function performs the synchronous reset sequence for the ANT chip
//
// \return Boolean value indicating weather or not the ANT chip was successfully reset
/////////////////////////////////////////////////////////////////////////////
SyncSerial_SyncReset
This function performs the synchronous reset sequence for the ANT chip

\return Boolean value indicating weather or not the ANT chip was successfully reset
SyncSerial_SyncReset This function performs the synchronous reset sequence for the ANT chip \ return Boolean value indicating weather or not the ANT chip was successfully reset
BOOL Serial_SyncReset(void)
{   
   SYNC_SMSGRDY_DEASSERT();
   Timer_DelayTime(100);                               
   SYNC_SRDY_ASSERT();
   Timer_DelayTime(30);                                
   SYNC_SMSGRDY_ASSERT();
   Timer_DelayTime(50000);                               
   sqTxMessages.ucHead = 0;                     
   sqTxMessages.ucTail = 0;
   sqTxMessages.ucMessageCount = 0;
   sqRxMessages.ucHead = 0;                     
   sqRxMessages.ucTail = 0;
   sqRxMessages.ucMessageCount = 0;
   sqRxMessages.bQueueOverflow = FALSE;
   SYNC_SRDY_DEASSERT();
   return IS_SEN_ASSERTED();
}
BOOL Serial_SyncReset ( void ) { SYNC_SMSGRDY_DEASSERT ( ) ; Timer_DelayTime ( 100 ) ; SYNC_SRDY_ASSERT ( ) ; Timer_DelayTime ( 30 ) ; SYNC_SMSGRDY_ASSERT ( ) ; Timer_DelayTime ( 50000 ) ; sqTxMessages . ucHead = 0 ; sqTxMessages . ucTail = 0 ; sqTxMessages . ucMessageCount = 0 ; sqRxMessages . ucHead = 0 ; sqRxMessages . ucTail = 0 ; sqRxMessages . ucMessageCount = 0 ; sqRxMessages . bQueueOverflow = FALSE ; SYNC_SRDY_DEASSERT ( ) ; return IS_SEN_ASSERTED ( ) ; }
SyncSerial_SyncReset
This function performs the synchronous reset sequence for the ANT chip
SyncSerial_SyncReset This function performs the synchronous reset sequence for the ANT chip
// Add delay to wait for ANT module to finish power up and get ready for incoming messages // The current system setup results in a delay of ~1ms; a minimum of 0.5ms  // are required for ANT to properly reset. // 1 ms // perform the Synchronous serial reset as described in Interfacing with // ANT General Purpose Chipsets and Modules document // Assert SRDY (SRDY = 0) // make sure there is a 250us delay between SRDY falling edge and SMSGRDY falling edge // 300 us delay // Assert SMSGRDY (SMSGRDY = 0) // Wait for ANT to lower SEN to indicate it is ready // wait 500 ms //Reset the Tx queue //Reset the Rx queue // raise SRDY (SRDY = 1)