int main()
{
  PIN_init(BoardGpioInitTable);

#ifndef POWER_SAVING
  /* Set constraints for Standby and Idle mode */
  Power_setConstraint(Power_SB_DISALLOW);
  Power_setConstraint(Power_IDLE_PD_DISALLOW);
#endif // POWER_SAVING

  /* Initialize ICall module */
  ICall_init();

  /* Start tasks of external images - Priority 5 */
  ICall_createRemoteTasks();

  /* Kick off profile - Priority 3 */
  GAPRole_createTask();

  /* Kick off application - Priority 1 */
  SensorTag_createTask();   // 创建BLE任务

  BIOS_start();     /* enable interrupts and start SYS/BIOS */

  return 0;
}
Пример #2
0
int main()
{
  PIN_init(BoardGpioInitTable);
  //Board_initGeneral();

#ifndef POWER_SAVING
  /* Set constraints for Standby and Idle mode */
  Power_setConstraint(Power_SB_DISALLOW);
  Power_setConstraint(Power_IDLE_PD_DISALLOW);
#endif // POWER_SAVING

  /* Initialize ICall module */
  ICall_init();

  /* Start tasks of external images - Priority 5 */
  ICall_createRemoteTasks();

  /* Kick off profile - Priority 3 */
  GAPRole_createTask();

  /* Kick off application - Priority 1 */
  SensorTag_createTask();
  SensorTagTmp_createTask();
  SensorTagHum_createTask();
  SensorTagBar_createTask();

  //UART_init();
  //UART_Params uartParams;
  //UART_Params_init(&uartParams);
  //uartParams.baudRate = 115200;
  //UartPrintf_init(UART_open(Board_UART, &uartParams));

  System_printf("Hello World :)");
  System_flush();
  //printf("Hello World :) 2");

  BIOS_start();     /* enable interrupts and start SYS/BIOS */

  return 0;
}