aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F1xx/RTC
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-11 20:05:55 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-11 20:05:55 +0000
commit9a52743e90152091c6cf1eabeee839c93948864c (patch)
treee362fa0f8950e9d7f7221936be2f33086dfd975d /testhal/STM32F1xx/RTC
parent4a5c4e2ae0098949ed614e22ae749620c730622f (diff)
downloadChibiOS-9a52743e90152091c6cf1eabeee839c93948864c.tar.gz
ChibiOS-9a52743e90152091c6cf1eabeee839c93948864c.tar.bz2
ChibiOS-9a52743e90152091c6cf1eabeee839c93948864c.zip
RTC. Setting and getting time works on STM32F4x
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/rtc_dev@3596 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F1xx/RTC')
-rw-r--r--testhal/STM32F1xx/RTC/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/testhal/STM32F1xx/RTC/main.c b/testhal/STM32F1xx/RTC/main.c
index ea7155f47..19043a02a 100644
--- a/testhal/STM32F1xx/RTC/main.c
+++ b/testhal/STM32F1xx/RTC/main.c
@@ -24,7 +24,7 @@
RTCTime timespec;
RTCAlarm alarmspec;
-#define TEST_ALARM_WAKEUP FALSE
+#define TEST_ALARM_WAKEUP TRUE
#if TEST_ALARM_WAKEUP
@@ -45,9 +45,9 @@ int main(void) {
chThdCreateStatic(blinkWA, sizeof(blinkWA), NORMALPRIO, blink_thd, NULL);
/* set alarm in near future */
- rtcGetTime(&timespec);
+ rtcGetTime(&RTCD1, &timespec);
alarmspec.tv_sec = timespec.tv_sec + 60;
- rtcSetAlarm(&alarmspec);
+ rtcSetAlarm(&RTCD1, 0, &alarmspec);
while (TRUE){
chThdSleepSeconds(10);