コード例 #1
0
void main_task(void *arg) {
  struct miot_event e;
  osi_MsgQCreate(&s_main_queue, "main", sizeof(e), 32 /* len */);

  enum cc3200_init_result r = cc3200_init(NULL);
  bool success = (r == CC3200_INIT_OK);
  if (!success) LOG(LL_ERROR, ("Init failed: %d", r));

#if MIOT_ENABLE_UPDATER
  miot_upd_boot_finish((r == CC3200_INIT_OK),
                       (g_boot_cfg.flags & BOOT_F_FIRST_BOOT));
#endif

  if (!success) {
    /* Arbitrary delay to make potential reboot loop less tight. */
    miot_usleep(500000);
    miot_system_restart(0);
  }

  while (1) {
    mongoose_poll(0);
    if (osi_MsgQRead(&s_main_queue, &e, V7_POLL_LENGTH_MS) == OSI_OK) {
      e.cb(e.arg);
    }
  }
}
コード例 #2
0
void tiva_boardinitialize(void)
{
  cc3200_init();
  cc3200_uart_init();

  cc3200_print("\r\nCC3200 init\r\n");

  cc3200_ledinit();
}
コード例 #3
0
void board_earlyinit(void)
{
  cc3200_init();
  cc3200_uart0_init();
}