//***************************************************************************** // //! GPIO Interrupt Handler for S2 button //! //! \param None //! //! \return None // //***************************************************************************** void GPIOs2IntHandler() { unsigned long ulPinState = GPIOIntStatus(GPIOA2_BASE,1); if(ulPinState & GPIO_PIN_6) { Button_IF_DisableInterrupt(SW2); g_S2InterruptHdl(); } }
//***************************************************************************** // //***************************************************************************** void main() { // // Initialize Board configurations // BoardInit(); // // Do Pin mux // PinMuxConfig(); // // Enable and configure DMA // UDMAInit(); // // Initialize the display // InitTerm(); // // Initialize the buttons // Button_IF_Init(OnPressSW2Handler,OnPressSW3Handler); Button_IF_DisableInterrupt(SW3); // // Initialize OTA // pvOtaApp = sl_extLib_OtaInit(RUN_MODE_NONE_OS | RUN_MODE_BLOCKING,0); // // Initialize the global flag // g_ulSysState = SYS_STATE_RUN; // // Create sync object to signal Sl_Start and Wlan Connect complete // TaskSyncObjCreate(&g_NetStatSyncObj); // // Create sync object to signal OTA start // TaskSyncObjCreate(&g_OTAStatSyncObj); // // Create sync object to signal display refresh // TaskSyncObjCreate(&g_DispRefreshSyncObj); // // Create sync object to signal Factory reset event // TaskSyncObjCreate(&g_FactResetSyncObj); // // Initialize Display Info // memset(&sDisplayInfo,0,sizeof(tDisplayInfo)); sDisplayInfo.ucLocalTime[0] = '-'; sDisplayInfo.ucUTCTime[0] = '-'; sprintf(sDisplayInfo.ucTimeZone,"%+03d:%02d", (char)GMT_DIFF_TIME_HRS, (char)GMT_DIFF_TIME_MINS); sprintf(sDisplayInfo.ucAppVersion,"%d.%d.%d", APP_VER_MAJOR, APP_VER_MINOR, APP_VER_BUILD); // // Start the Print task // TaskCreate(DisplayTask, NULL); // // Start the GetNTPTime task // TaskCreate(GetNTPTimeTask, NULL); // // OTA Update Task // TaskCreate(OTAUpdateTask, NULL); // // SL main loop task; // TaskCreate(NonOSMainLoopTask, NULL); // // Factory Reset Task // TaskCreate(FactoryResetTask,NULL); // // Start the task scheduler // TaskMainLoopStart(); // // Infinite loop. Control Should never reach here // while(1) { } }