![]() |
mikroSDK Reference Manual
|
RTC Driver API Reference. More...
Functions list | |
| void | rtc_init () |
| Initialize the RTC module. More... | |
| err_t | rtc_start () |
| Start the RTC module. More... | |
| err_t | rtc_stop () |
| Stop the RTC module. More... | |
| err_t | rtc_reset () |
| Reset the RTC module. More... | |
| err_t | rtc_set_time (rtc_time_t *time) |
| Configure time of RTC module. More... | |
| err_t | rtc_get_time (rtc_time_t *time) |
| Get time from RTC module. More... | |
| void | rtc_system_reset () |
| Preforms system reset. More... | |
The RTC driver provides standard RTC functionality including start, reset and stop of RTC counter, it also allows setting custom values.
| void rtc_init | ( | ) |
Initialize the RTC module.
| None. | Example // Initialize RTC.
rtc_init();
|
| err_t rtc_start | ( | ) |
Continue the RTC module count from the stored value in the counter register.
| None. |
Example
| err_t rtc_stop | ( | ) |
Stop the RTC module count.
| None. |
Example
| err_t rtc_reset | ( | ) |
Reset the RTC counter to the default values of 0h:0m:0s.
| None. |
Example
| err_t rtc_set_time | ( | rtc_time_t * | time | ) |
Configure time registers with the values from rtc_time_t structure.
| time | rtc_time_t structure. |
Example
| err_t rtc_get_time | ( | rtc_time_t * | time | ) |
Configure rtc_time_t structure with the values from time registers.
| time | rtc_time_t structure. |
Example
| void rtc_system_reset | ( | ) |
Resets the core and all on-chip peripherals except the Debug interface.
| None. |
Example