RTCv2. Alarm numbering now uses more intuitive scheme (starting from 0).

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7453 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
barthess 2014-11-01 18:51:06 +00:00
parent d2e246dd29
commit 6d74608aff
1 changed files with 2 additions and 2 deletions

View File

@ -334,7 +334,7 @@ void rtc_lld_set_alarm(RTCDriver *rtcp,
/* Entering a reentrant critical zone.*/
sts = chSysGetStatusAndLockX();
if (alarm == 1) {
if (alarm == 0) {
if (alarmspec != NULL) {
rtcp->rtc->CR &= ~RTC_CR_ALRAE;
while (!(rtcp->rtc->ISR & RTC_ISR_ALRAWF))
@ -383,7 +383,7 @@ void rtc_lld_get_alarm(RTCDriver *rtcp,
rtcalarm_t alarm,
RTCAlarm *alarmspec) {
if (alarm == 1)
if (alarm == 0)
alarmspec->alrmr = rtcp->rtc->ALRMAR;
#if RTC_ALARMS > 1
else