1.10.20.4 1.11.20.4 1.12.21.4 1.13.19.4 1.14.14.4 1.15.15.4 1.16.21.4 1.17.17.4 1.18.17.4 1.19.17.4 1.20.21.4 1.21.22.4 1.22.23.4 1.23.22.4 1.24.19.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.