This driver converts between a RTC 1-second tick value and a Universal time format in a structure of type 'struct tm'.
|
| void | ConvertRtcTime (uint32_t rtcTick, struct tm *pTime) |
| | Converts a RTC tick time to Universal time. More...
|
| |
| void | ConvertTimeRtc (struct tm *pTime, uint32_t *rtcTick) |
| | Converts a Universal time to RTC tick time. More...
|
| |
| #define TM_YEAR_BASE (1900) |
| void ConvertRtcTime |
( |
uint32_t |
rtcTick, |
|
|
struct tm * |
pTime |
|
) |
| |
Converts a RTC tick time to Universal time.
- Parameters
-
| rtcTick | : Current RTC time value |
| pTime | : Pointer to time structure to fill |
- Returns
- Nothing
- Note
- When setting time, the 'tm_wday', 'tm_yday', and 'tm_isdst' fields are not used.
Definition at line 130 of file rtc_ut.c.
| void ConvertTimeRtc |
( |
struct tm * |
pTime, |
|
|
uint32_t * |
rtcTick |
|
) |
| |
Converts a Universal time to RTC tick time.
- Parameters
-
| pTime | : Pointer to time structure to use |
| rtcTick | : Pointer to RTC time value to fill |
- Returns
- Nothing
- Note
- When converting time, the 'tm_isdst' field is not populated by the conversion function.
Definition at line 154 of file rtc_ut.c.