RTC Driver API Reference.
More...
◆ rtc_get_time()
Configure rtc_time_t structure with the values from time registers.
- Parameters
-
- Returns
- The function can return one of the values defined by rtc_err_t structure, which is size dependant on the architecture.
- Note
- It is recommended to check return value for error.
Example
}
@ RTC_SUCCESS
Definition drv_rtc.h:58
err_t rtc_get_time(rtc_time_t *time)
Get time from RTC module.
void rtc_init()
Initialize the RTC module.
Structure representing the RTC time.
Definition drv_rtc.h:81
◆ rtc_init()
Initialize the RTC module.
- Parameters
-
Example
◆ rtc_reset()
Reset the RTC counter to the default values of 0h:0m:0s.
- Parameters
-
- Returns
- The function can return one of the values defined by rtc_err_t structure, which is size dependant on the architecture.
- Note
- It is recommended to check return value for error.
Example
}
@ RTC_ERROR
Definition drv_rtc.h:59
err_t rtc_reset()
Reset the RTC module.
◆ rtc_set_time()
Configure time registers with the values from rtc_time_t structure.
- Parameters
-
- Returns
- The function can return one of the values defined by rtc_err_t structure, which is size dependant on the architecture.
- Note
- It is recommended to check return value for error.
Example
time.second = 0;
time.minute = 5;
time.hour = 3;
}
err_t rtc_set_time(rtc_time_t *time)
Configure time of RTC module.
◆ rtc_start()
Continue the RTC module count from the stored value in the counter register.
- Parameters
-
- Returns
- The function can return one of the values defined by rtc_err_t structure, which is size dependant on the architecture.
- Note
- It is recommended to configure RTC module using rtc_set_time( rtc_time_t *time ) before the first start and to check return value for error.
Example
}
err_t rtc_start()
Start the RTC module.
◆ rtc_stop()
Stop the RTC module count.
- Parameters
-
- Returns
- The function can return one of the values defined by rtc_err_t structure, which is size dependant on the architecture.
- Note
- It is recommended to check return value for error.
Example
}
err_t rtc_stop()
Stop the RTC module.
◆ rtc_system_reset()
void rtc_system_reset |
( |
| ) |
|
Resets the core and all on-chip peripherals except the Debug interface.
- Parameters
-
- Warning
- System reset affects core and periferals, depending on the architecture you will need to reconfigure opened modules.
Example
void rtc_system_reset()
Preforms system reset.