RTCv2. Added locks for thread safety.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4703 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
406ee2993e
commit
bd58700cd5
|
@ -281,7 +281,10 @@ uint32_t rtc_lld_get_time_fat(RTCDriver *rtcp) {
|
||||||
uint32_t tv_date;
|
uint32_t tv_date;
|
||||||
uint32_t v;
|
uint32_t v;
|
||||||
|
|
||||||
rtc_lld_get_time(rtcp, ×pec);
|
chSysLock();
|
||||||
|
rtcGetTimeI(rtcp, ×pec);
|
||||||
|
chSysUnlock();
|
||||||
|
|
||||||
tv_time = timespec.tv_time;
|
tv_time = timespec.tv_time;
|
||||||
tv_date = timespec.tv_date;
|
tv_date = timespec.tv_date;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue