Exemple #1
0
/*
 * console_init
 * This function will initialize debug console.
 */
void console_init()
{
    /* Clear the console data. */
    memset(&console_data, 0, sizeof(CONSOLE_DATA));

#ifdef CONFIG_SEMAPHORE
    /* Create a semaphore to protect global console data. */
    semaphore_create(&console_data.lock, 1, 1, SEMAPHORE_PRIORITY);
#endif

    /* Register console with file system. */
    fs_register(&console_fs);

#ifdef DEBUG_CONSOLE_INIT
    /* Initialize DEBUG console. */
    DEBUG_CONSOLE_INIT();
#endif

} /* console_init */
Exemple #2
0
/** 
* Configures hardware for the particular board
* - Initializes clocks
* - Ports: including purpose, direction, pullup/pulldown resistors etc. 
* - Holds radio in reset (active-low)
*/
void halInit()
{    
  oscInit();
  portInit();  
  DEBUG_CONSOLE_INIT(BAUD_RATE_19200);
  AUX_SERIAL_PORT_INIT(BAUD_RATE_115200);  //Module uses 115,200 8N1 WITH FLOW CONTROL
  
  //
  //   Deselect SPI peripherals:
  //
  SPI_SS_CLEAR();                       // Deselect Module
  
  //  Stop Timer A:
  TACTL = MC_0;     
  
  debugConsoleIsr = &doNothing;
  buttonIsr = &doNothing;
  
  halSpiInitModule();
}