예제 #1
0
파일: main.c 프로젝트: bboozzoo/zephyr
void main(void)
{
	printk("Power Management Demo on %s\n", CONFIG_ARCH);

	setup_rtc();

	create_device_list();

	while (1) {
		printk("\nApplication main thread\n");
		k_sleep(SECONDS_TO_SLEEP * 1000);
	}
}
예제 #2
0
파일: main.c 프로젝트: EricZaluzec/zephyr
void main(void)
{
	struct rtc_config config;

	PRINT("Power Management Demo\n");

	config.init_val = 0;
	config.alarm_enable = 0;
	config.alarm_val = RTC_ALARM_SECOND;
	config.cb_fn = NULL;

	rtc_dev = device_get_binding(CONFIG_RTC_DRV_NAME);
	rtc_enable(rtc_dev);
	rtc_set_config(rtc_dev, &config);

	create_device_list();

	while (1) {
		task_sleep(SLEEPTICKS);
	}
}