1.12.21.4 RTCC_TimeGet Function
C
void RTCC_TimeGet(struct tm *Time );
Summary
Gets time and date from the RTCC peripheral.
Description
This functions gets current time and date from the RTCC peripheral.
Precondition
The RTCC_Initialize() function should have been called to initialize the RTCC peripheral.
Parameters
Param | Description |
---|---|
Time | Structure which holds the time and date information. |
Returns
None.
Example
struct tm sys_time; RTCC_TimeGet(&sys_time);
Remarks
This function checks RTCSYNC before writing into RTCTIME and RTCDATE registers. Thus no separate check for the bit is needed.