diff options
author | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-09-20 18:33:44 +0000 |
---|---|---|
committer | barthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-09-20 18:33:44 +0000 |
commit | bd58700cd5cefa8ec2d5e66a5a7937f774e617f2 (patch) | |
tree | 0ba8d2fdc5ea9136633f0bc98def0caf2c596f6c | |
parent | 406ee2993e054209845889ced5e36ab17b423bea (diff) | |
download | ChibiOS-bd58700cd5cefa8ec2d5e66a5a7937f774e617f2.tar.gz ChibiOS-bd58700cd5cefa8ec2d5e66a5a7937f774e617f2.tar.bz2 ChibiOS-bd58700cd5cefa8ec2d5e66a5a7937f774e617f2.zip |
RTCv2. Added locks for thread safety.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4703 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/platforms/STM32/RTCv2/rtc_lld.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/os/hal/platforms/STM32/RTCv2/rtc_lld.c b/os/hal/platforms/STM32/RTCv2/rtc_lld.c index 1fe433324..48a81dd96 100644 --- a/os/hal/platforms/STM32/RTCv2/rtc_lld.c +++ b/os/hal/platforms/STM32/RTCv2/rtc_lld.c @@ -281,7 +281,10 @@ uint32_t rtc_lld_get_time_fat(RTCDriver *rtcp) { uint32_t tv_date;
uint32_t v;
- rtc_lld_get_time(rtcp, ×pec);
+ chSysLock();
+ rtcGetTimeI(rtcp, ×pec);
+ chSysUnlock();
+
tv_time = timespec.tv_time;
tv_date = timespec.tv_date;
|