# RTC Usage Guidelines - [How to Use](#section620515765714) - [Creating an RTC Device Handle](#section0702183665711) - [Releasing the RTC Device Handle](#section639962619542) - [Registering RtcAlarmCallback](#section123631358135713) - [Performing RTC-related Operations](#section11091522125812) ## How to Use During the OS startup, the HDF loads the RTC driver based on the configuration file. The RTC driver detects the RTC component and initializes the driver. [Figure 1](#fig166181128151112) illustrates the process of an RTC device. **Figure 1** Process of using an RTC device  ## Creating an RTC Device Handle After the RTC driver is loaded successfully, you can use the API provided by the HDF and call APIs of the RTC driver. > **NOTE:** >Currently, only one RTC device is supported in the OS. DevHandle RtcOpen\(void\); **Table 1** Description of **RtcOpen**
Callback that will be invoked when an alarm is generated at the specified time. |
|
Pointer to the time information read from the RTC driver. The time information includes the year, month, the day of the week, day, hour, minute, second, and millisecond. |
|
Pointer to the time information written into the RTC driver. The time information includes the year, month, the day of the week, day, hour, minute, second, and millisecond. |
|
Pointer to the RTC alarm time information. The time information includes the year, month, the day of the week, day, hour, minute, second, and millisecond. |
|
Pointer to the RTC alarm time information. The time information includes the year, month, the day of the week, day, hour, minute, second, and millisecond. |
|
Whether to enable RTC alarm interrupts. Value 1 means to enable alarm interrupts and value 0 means to disable alarm interrupts. |
|
Frequency to set for the external crystal oscillator, in Hz. |
|
Frequency to set for the external crystal oscillator, in Hz. |
|