RTCv2. Added locks for thread safety.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4703 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
barthess 2012-09-20 18:33:44 +00:00
parent 406ee2993e
commit bd58700cd5
1 changed files with 4 additions and 1 deletions

View File

@ -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, &timespec); chSysLock();
rtcGetTimeI(rtcp, &timespec);
chSysUnlock();
tv_time = timespec.tv_time; tv_time = timespec.tv_time;
tv_date = timespec.tv_date; tv_date = timespec.tv_date;