diff options
author | Uladzimir Pylinski <barthess@yandex.ru> | 2015-03-16 14:36:22 +0000 |
---|---|---|
committer | Uladzimir Pylinski <barthess@yandex.ru> | 2015-03-16 14:36:22 +0000 |
commit | 216e5866870ea1794d701ca60cd61f4c0ebc097b (patch) | |
tree | 7cb8c6419f1eb5dcbe22842806aa498e6bd2e4b1 /os | |
parent | 06b66b49e4f9c2cd4a2d667686de5bb9d38946e1 (diff) | |
download | ChibiOS-216e5866870ea1794d701ca60cd61f4c0ebc097b.tar.gz ChibiOS-216e5866870ea1794d701ca60cd61f4c0ebc097b.tar.bz2 ChibiOS-216e5866870ea1794d701ca60cd61f4c0ebc097b.zip |
RTC. Fixed conversion function.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7780 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/src/rtc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/os/hal/src/rtc.c b/os/hal/src/rtc.c index 653f6590b..9c7256e50 100644 --- a/os/hal/src/rtc.c +++ b/os/hal/src/rtc.c @@ -262,9 +262,9 @@ void rtcConvertStructTmToDateTime(const struct tm *timp, }
/*lint -restore*/
/*lint -save -e9033 [10.8] Verified assignments to bit fields.*/
- timespec->millisecond = tv_msec + (uint32_t)((timp->tm_hour * 3600) +
- (timp->tm_min * 60) +
- (timp->tm_sec * 1000));
+ timespec->millisecond = tv_msec + (uint32_t)(((timp->tm_hour * 3600) +
+ (timp->tm_min * 60) +
+ timp->tm_sec) * 1000);
/*lint -restore*/
}
|