void *mainThread(void *arg0) { pthread_attr_t pthreadAttrs; pthread_t slThread; pthread_t azureThread; int status; _i16 Status; _u8 persistent = 1; Board_init(); GPIO_init(); SPI_init(); Init_Timer(); Init_Timer1(); Init_Timer2(); Init_PWM(); #if MAIN_DBG_MODE Display_init(); /* Open the Display for output */ display = Display_open(Display_Type_UART, NULL); if (display == NULL) { /* Failed to open the Display driver */ Display_printf(display, 0, 0, "Failed to open the Display driver %d",display); while (1); } #endif Network_init(); MCU_Init(); Status = sl_DeviceSet(SL_DEVICE_GENERAL, SL_DEVICE_GENERAL_PERSISTENT, sizeof(_u8), (_u8*) (&persistent)); if( Status ) { /* error */ } /* Configure the LED and button pins */ GPIO_setConfig(TEST_PIN, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW); GPIO_write(TEST_PIN, LED_OFF);