diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-01-14 08:45:34 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-01-14 08:45:34 +0000 |
commit | d29e6e338ec4da796225af4dbc9ab001406a14a8 (patch) | |
tree | eab6dd0eca5397faaee1c674b0a468cffbbac869 /os/hal/src | |
parent | a2672b8dbb01e460ed1a000143bd22add48fc2b7 (diff) | |
download | ChibiOS-d29e6e338ec4da796225af4dbc9ab001406a14a8.tar.gz ChibiOS-d29e6e338ec4da796225af4dbc9ab001406a14a8.tar.bz2 ChibiOS-d29e6e338ec4da796225af4dbc9ab001406a14a8.zip |
Added I-Class APIs to the RTC driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3807 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src')
-rw-r--r-- | os/hal/src/rtc.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/os/hal/src/rtc.c b/os/hal/src/rtc.c index 1f463eb38..6cf254706 100644 --- a/os/hal/src/rtc.c +++ b/os/hal/src/rtc.c @@ -79,7 +79,9 @@ void rtcSetTime(RTCDriver *rtcp, const RTCTime *timespec) { chDbgCheck((rtcp != NULL) && (timespec != NULL), "rtcSetTime");
- rtc_lld_set_time(rtcp, timespec);
+ chSysLock();
+ rtcSetTimeI(rtcp, timespec);
+ chSysUnlock();
}
/**
@@ -94,7 +96,9 @@ void rtcGetTime(RTCDriver *rtcp, RTCTime *timespec) { chDbgCheck((rtcp != NULL) && (timespec != NULL), "rtcGetTime");
- rtc_lld_get_time(rtcp, timespec);
+ chSysLock();
+ rtcGetTimeI(rtcp, timespec);
+ chSysUnlock();
}
#if (RTC_ALARMS > 0) || defined(__DOXYGEN__)
@@ -113,7 +117,9 @@ void rtcSetAlarm(RTCDriver *rtcp, chDbgCheck((rtcp != NULL) && (alarm < RTC_ALARMS), "rtcSetAlarm");
- rtc_lld_set_alarm(rtcp, alarm, alarmspec);
+ chSysLock();
+ rtcSetAlarmI(rtcp, alarm, alarmspec);
+ chSysUnlock();
}
/**
@@ -134,7 +140,9 @@ void rtcGetAlarm(RTCDriver *rtcp, chDbgCheck((rtcp != NULL) && (alarm < RTC_ALARMS) && (alarmspec != NULL),
"rtcGetAlarm");
- rtc_lld_get_alarm(rtcp, alarm, alarmspec);
+ chSysLock();
+ rtcGetAlarmI(rtcp, alarm, alarmspec);
+ chSysUnlock();
}
#endif /* RTC_ALARMS > 0 */
@@ -153,7 +161,9 @@ void rtcSetCallback(RTCDriver *rtcp, rtccb_t callback) { chDbgCheck((rtcp != NULL), "rtcSetCallback");
- rtc_lld_set_callback(rtcp, callback);
+ chSysLock();
+ rtcSetCallbackI(rtcp, callback);
+ chSysUnlock();
}
#endif /* RTC_SUPPORTS_CALLBACKS */
|