base/serial.c
BOOL Serial_Init()
{

   // Synchronous MUST be initialized before asynchronous (if doing sync to ANT and
   // asynch for printf. This is because the synch init changes some gpio's to an output
   // on startup to configure synch mode on ANT. This off course messes up what the gpio's
   // must be for asynch, hence the asynch init must be called after the synch init.
#if defined(SERIAL_BYTE_SYNCHRONOUS) || defined(SERIAL_BIT_SYNCHRONOUS)
   Synchronous_Init();
#endif
#if defined(SERIAL_UART_ASYNC) || defined(USE_UART_DEBUG)
   Asynchronous_Init(BAUD_50000_INDEX);
#endif   

   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;

   return(TRUE);   
}
////////////////////////////////////////////////////////////////////////////
// Serial_Init
//
// Initiates serial driver, queues and state machine.
//  
// Returns TRUE if successful.
//
////////////////////////////////////////////////////////////////////////////
Serial_Init
Initiates serial driver, queues and state machine.

Returns TRUE if successful.
Serial_Init Initiates serial driver queues and state machine . Returns TRUE if successful .
BOOL Serial_Init()
{
#if defined(SERIAL_BYTE_SYNCHRONOUS) || defined(SERIAL_BIT_SYNCHRONOUS)
   Synchronous_Init();
#endif
#if defined(SERIAL_UART_ASYNC) || defined(USE_UART_DEBUG)
   Asynchronous_Init(BAUD_50000_INDEX);
#endif   
   sqTxMessages.ucHead = 0;                     
   sqTxMessages.ucTail = 0;
   sqTxMessages.ucMessageCount = 0;
   sqRxMessages.ucHead = 0;                     
   sqRxMessages.ucTail = 0;
   sqRxMessages.ucMessageCount = 0;
   sqRxMessages.bQueueOverflow = FALSE;
   return(TRUE);   
}
BOOL Serial_Init ( ) { #if defined ( SERIAL_BYTE_SYNCHRONOUS ) || defined ( SERIAL_BIT_SYNCHRONOUS ) Synchronous_Init ( ) ; #endif #if defined ( SERIAL_UART_ASYNC ) || defined ( USE_UART_DEBUG ) Asynchronous_Init ( BAUD_50000_INDEX ) ; #endif sqTxMessages . ucHead = 0 ; sqTxMessages . ucTail = 0 ; sqTxMessages . ucMessageCount = 0 ; sqRxMessages . ucHead = 0 ; sqRxMessages . ucTail = 0 ; sqRxMessages . ucMessageCount = 0 ; sqRxMessages . bQueueOverflow = FALSE ; return ( TRUE ) ; }
Serial_Init
Initiates serial driver, queues and state machine.
Serial_Init Initiates serial driver queues and state machine .
// Synchronous MUST be initialized before asynchronous (if doing sync to ANT and // asynch for printf. This is because the synch init changes some gpio's to an output // on startup to configure synch mode on ANT. This off course messes up what the gpio's // must be for asynch, hence the asynch init must be called after the synch init. //Reset the Tx queue //Reset the Rx queue