void main(void) { printk("Quark SE: Power Management sample application\n"); #if (CONFIG_RTC) setup_rtc(); #elif (CONFIG_COUNTER) setup_counter(); #elif (CONFIG_GPIO_QMSI_1) setup_aon_gpio(); #endif build_suspend_device_list(); #ifdef CONFIG_SOC_WATCH /* Start the event monitoring thread */ soc_watch_logger_thread_start(); #endif /* All our application does is putting the task to sleep so the kernel * triggers the suspend operation. */ while (1) { k_sleep(TIMEOUT * 1000); printk("Back to the application\n"); } }
void main(void) { init_io(); setup_counter(); usb_init(); ep0_init(); while (1) { read_counter(); usb_poll(); } }