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:
parent
d2e246dd29
commit
6d74608aff
|
@ -334,7 +334,7 @@ void rtc_lld_set_alarm(RTCDriver *rtcp,
|
||||||
/* Entering a reentrant critical zone.*/
|
/* Entering a reentrant critical zone.*/
|
||||||
sts = chSysGetStatusAndLockX();
|
sts = chSysGetStatusAndLockX();
|
||||||
|
|
||||||
if (alarm == 1) {
|
if (alarm == 0) {
|
||||||
if (alarmspec != NULL) {
|
if (alarmspec != NULL) {
|
||||||
rtcp->rtc->CR &= ~RTC_CR_ALRAE;
|
rtcp->rtc->CR &= ~RTC_CR_ALRAE;
|
||||||
while (!(rtcp->rtc->ISR & RTC_ISR_ALRAWF))
|
while (!(rtcp->rtc->ISR & RTC_ISR_ALRAWF))
|
||||||
|
@ -383,7 +383,7 @@ void rtc_lld_get_alarm(RTCDriver *rtcp,
|
||||||
rtcalarm_t alarm,
|
rtcalarm_t alarm,
|
||||||
RTCAlarm *alarmspec) {
|
RTCAlarm *alarmspec) {
|
||||||
|
|
||||||
if (alarm == 1)
|
if (alarm == 0)
|
||||||
alarmspec->alrmr = rtcp->rtc->ALRMAR;
|
alarmspec->alrmr = rtcp->rtc->ALRMAR;
|
||||||
#if RTC_ALARMS > 1
|
#if RTC_ALARMS > 1
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue