コード例 #1
0
ファイル: main.c プロジェクト: bboozzoo/zephyr
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");
	}
}
コード例 #2
0
ファイル: cntr.c プロジェクト: cfriedt/ben-wpan
void main(void)
{
	init_io();
	setup_counter();

	usb_init();
	ep0_init();

	while (1) {
		read_counter();
		usb_poll();
	}
}