diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-12-11 20:05:55 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-12-11 20:05:55 +0000 |
commit | 9a52743e90152091c6cf1eabeee839c93948864c (patch) | |
tree | e362fa0f8950e9d7f7221936be2f33086dfd975d /testhal/STM32F1xx | |
parent | 4a5c4e2ae0098949ed614e22ae749620c730622f (diff) | |
download | ChibiOS-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')
-rw-r--r-- | testhal/STM32F1xx/RTC/main.c | 6 |
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(×pec);
+ rtcGetTime(&RTCD1, ×pec);
alarmspec.tv_sec = timespec.tv_sec + 60;
- rtcSetAlarm(&alarmspec);
+ rtcSetAlarm(&RTCD1, 0, &alarmspec);
while (TRUE){
chThdSleepSeconds(10);
|