![]() |
Synergy Software Package User's Manual
|
#include <r_rtc_api.h>
RTC driver structure. General RTC functions implemented at the HAL layer follow this API.
| ssp_err_t(* rtc_api_t::calendarAlarmGet) (rtc_ctrl_t *const p_ctrl, rtc_alarm_time_t *p_alarm) |
Get the calendar alarm time.
| [in] | p_ctrl | Pointer to RTC device handle |
| [out] | p_alarm | Pointer to an alarm structure to fill up with the alarm time |
| ssp_err_t(* rtc_api_t::calendarAlarmSet) (rtc_ctrl_t *const p_ctrl, rtc_alarm_time_t *p_alarm, bool irq_enable_flag) |
Set the calendar alarm time.
| [in] | p_ctrl | Pointer to RTC device handle |
| [in] | p_alarm | Pointer to an alarm structure that contains the alarm time to set |
| [in] | irq_enable_flag | Enable the ALARM irq if set |
| ssp_err_t(* rtc_api_t::calendarCounterStart) (rtc_ctrl_t *const p_ctrl) |
Start the calendar counter.
| [in] | p_ctrl | Pointer to RTC device handle |
| ssp_err_t(* rtc_api_t::calendarCounterStop) (rtc_ctrl_t *const p_ctrl) |
Stop the calendar counter.
| [in] | p_ctrl | Pointer to RTC device handle |
| ssp_err_t(* rtc_api_t::calendarTimeGet) (rtc_ctrl_t *const p_ctrl, rtc_time_t *p_time) |
Get the calendar time.
| [in] | p_ctrl | Pointer to RTC device handle |
| [out] | p_time | Pointer to a time structure that contains the time to get |
| ssp_err_t(* rtc_api_t::calendarTimeSet) (rtc_ctrl_t *const p_ctrl, rtc_time_t *p_time, bool clock_start) |
Set the calendar time.
| [in] | p_ctrl | Pointer to RTC device handle |
| [in] | p_time | Pointer to a time structure that contains the time to set |
| [in] | clock_start | Flag that starts the clock right after it is set |
| ssp_err_t(* rtc_api_t::close) (rtc_ctrl_t *const p_ctrl) |
Close the RTC driver.
| [in] | p_ctrl | Pointer to RTC device handle. |
| ssp_err_t(* rtc_api_t::configure) (rtc_ctrl_t *const p_ctrl, void *const p_extend) |
Configure the RTC driver.
| [in] | p_ctrl | Pointer to RTC device handle. |
| [in] | p_extend | Currently not implemented, pass NULL. |
| ssp_err_t(* rtc_api_t::errorAdjustmentModeSet) (rtc_ctrl_t *p_ctrl, rtc_error_adjustment_mode_cfg_t *p_error_adjustment_mode) |
Set time error adjustment mode.
| [in] | p_ctrl | Pointer to control handle structure |
| [in] | p_error_adjustment_mode | Pointer to error adjustment mode configuration structure |
| ssp_err_t(* rtc_api_t::errorAdjustmentSet) (rtc_ctrl_t *p_ctrl, rtc_error_adjustment_cfg_t *p_error_adjustment_config) |
Set time error adjustment.
| [in] | p_ctrl | Pointer to control handle structure |
| [in] | p_error_adjustment_config | Pointer to error adjustment structure |
| ssp_err_t(* rtc_api_t::infoGet) (rtc_ctrl_t *p_ctrl, rtc_info_t *p_rtc_info) |
Return the currently configure clock source for the RTC
| [in] | p_ctrl | Pointer to control handle structure |
| [out] | p_rtc_info | Pointer to RTC information structure |
| ssp_err_t(* rtc_api_t::irqDisable) (rtc_ctrl_t *const p_ctrl, rtc_event_t irq) |
Disable the alarm irq.
| [in] | p_ctrl | Pointer to RTC device handle |
| ssp_err_t(* rtc_api_t::irqEnable) (rtc_ctrl_t *const p_ctrl, rtc_event_t irq) |
Enable the alarm irq.
| [in] | p_ctrl | Pointer to RTC device handle |
| ssp_err_t(* rtc_api_t::open) (rtc_ctrl_t *const p_ctrl, rtc_cfg_t const *const p_cfg) |
Open the RTC driver.
| [in] | p_ctrl | Pointer to RTC device handle |
| [in] | p_cfg | Pointer to the configuration structure |
| ssp_err_t(* rtc_api_t::periodicIrqRateSet) (rtc_ctrl_t *const p_ctrl, rtc_periodic_irq_select_t rate) |
Set the periodic irq rate
| [in] | p_ctrl | Pointer to RTC device handle |
| [in] | rate | Rate of periodic interrupts |
| ssp_err_t(* rtc_api_t::versionGet) (ssp_version_t *version) |
Gets version and stores it in provided pointer p_version.
| [out] | p_version | Code and API version used |