Initialization and Configuration functions. More...
Functions | |
| hal_status_t | hal_rtc_init (rtc_handle_t *p_rtc) |
| Initialize the RTC according to the specified parameters in the rtc_init_t of associated handle.counter start after hal_rtc_init. More... | |
| hal_status_t | hal_rtc_deinit (rtc_handle_t *p_rtc) |
| DeInitialize the RTC according to the specified parameters in the rtc_init_t of associated handle.counter stop after hal_rtc_deinit. More... | |
| hal_status_t | hal_rtc_set_tick_and_start (rtc_handle_t *p_rtc, uint8_t mode, uint32_t value) |
| Start counting down for tick module. More... | |
| hal_status_t | hal_rtc_stop_tick (rtc_handle_t *p_rtc) |
| Stop counting down for tick module. More... | |
| hal_status_t | hal_rtc_restart_tick (rtc_handle_t *p_rtc) |
| Restart tick module and continue run with the previous settings. This function need be called after hal_rtc_stop_tick. More... | |
| hal_status_t | hal_rtc_set_alarm (rtc_handle_t *p_rtc, uint32_t value) |
| Compare counter with alarm_value for alarm module. More... | |
| hal_status_t | hal_rtc_stop_alarm (rtc_handle_t *p_rtc) |
| Stop counting up and compare with alarm_value for alarm module. More... | |
| hal_status_t | hal_rtc_clear_wrap (rtc_handle_t *p_rtc) |
| Clear wrap count. More... | |
| uint32_t | hal_rtc_get_wrap_count (rtc_handle_t *p_rtc) |
| Get the times of overflow. More... | |
| uint32_t | hal_rtc_get_cur_count (rtc_handle_t *p_rtc) |
| Get_cur_count_value. More... | |
| uint32_t | hal_rtc_get_cur_tick (rtc_handle_t *p_rtc) |
| Get_cur_tick_value. More... | |
| uint32_t | hal_rtc_get_alarm_value (rtc_handle_t *p_rtc) |
| Get_alarm_value. More... | |
| hal_rtc_state_t | hal_rtc_get_state (rtc_handle_t *p_rtc) |
| Get_cur_rtc_state. More... | |
Initialization and Configuration functions.
| hal_status_t hal_rtc_clear_wrap | ( | rtc_handle_t * | p_rtc | ) |
Clear wrap count.
| [in] | p_rtc | Pointer to a RTC handle which contains the configuration information for the specified RTC module. |
| HAL_OK | Operation is OK. |
| HAL_ERROR | Parameter error or operation not supported. |
| HAL_BUSY | Driver is busy. |
| HAL_TIMEOUT | Timeout occurred. |
| hal_status_t hal_rtc_deinit | ( | rtc_handle_t * | p_rtc | ) |
DeInitialize the RTC according to the specified parameters in the rtc_init_t of associated handle.counter stop after hal_rtc_deinit.
| [in] | p_rtc | Pointer to a RTC handle which contains the configuration information for the specified RTC module. |
| HAL_OK | Operation is OK. |
| HAL_ERROR | Parameter error or operation not supported. |
| HAL_BUSY | Driver is busy. |
| HAL_TIMEOUT | Timeout occurred. |
| uint32_t hal_rtc_get_alarm_value | ( | rtc_handle_t * | p_rtc | ) |
Get_alarm_value.
| [in] | p_rtc | Pointer to a RTC handle which contains the configuration information for the specified RTC module. |
| ::uint32_t |
| uint32_t hal_rtc_get_cur_count | ( | rtc_handle_t * | p_rtc | ) |
Get_cur_count_value.
| [in] | p_rtc | Pointer to a RTC handle which contains the configuration information for the specified RTC module. |
| ::uint32_t |
| uint32_t hal_rtc_get_cur_tick | ( | rtc_handle_t * | p_rtc | ) |
Get_cur_tick_value.
| [in] | p_rtc | Pointer to a RTC handle which contains the configuration information for the specified RTC module. |
| ::uint32_t |
| hal_rtc_state_t hal_rtc_get_state | ( | rtc_handle_t * | p_rtc | ) |
Get_cur_rtc_state.
| [in] | p_rtc | Pointer to a RTC handle which contains the configuration information for the specified RTC module. |
| HAL_OK | Operation is OK. |
| HAL_ERROR | Parameter error or operation not supported. |
| HAL_BUSY | Driver is busy. |
| HAL_TIMEOUT | Timeout occurred. |
| uint32_t hal_rtc_get_wrap_count | ( | rtc_handle_t * | p_rtc | ) |
Get the times of overflow.
| [in] | p_rtc | Pointer to a RTC handle which contains the configuration information for the specified RTC module. |
| ::uint32_t |
| hal_status_t hal_rtc_init | ( | rtc_handle_t * | p_rtc | ) |
Initialize the RTC according to the specified parameters in the rtc_init_t of associated handle.counter start after hal_rtc_init.
| [in] | p_rtc | Pointer to a RTC handle which contains the configuration information for the specified RTC module. |
| HAL_OK | Operation is OK. |
| HAL_ERROR | Parameter error or operation not supported. |
| HAL_BUSY | Driver is busy. |
| HAL_TIMEOUT | Timeout occurred. |
| hal_status_t hal_rtc_restart_tick | ( | rtc_handle_t * | p_rtc | ) |
Restart tick module and continue run with the previous settings. This function need be called after hal_rtc_stop_tick.
| [in] | p_rtc | Pointer to a RTC handle which contains the configuration information for the specified RTC module. |
| HAL_OK | Operation is OK. |
| HAL_ERROR | Parameter error or operation not supported. |
| HAL_BUSY | Driver is busy. |
| HAL_TIMEOUT | Timeout occurred. |
| hal_status_t hal_rtc_set_alarm | ( | rtc_handle_t * | p_rtc, |
| uint32_t | value | ||
| ) |
Compare counter with alarm_value for alarm module.
| [in] | p_rtc | Pointer to a RTC handle which contains the configuration information for the specified RTC module. |
| value | The value of alarm |
| HAL_OK | Operation is OK. |
| HAL_ERROR | Parameter error or operation not supported. |
| HAL_BUSY | Driver is busy. |
| HAL_TIMEOUT | Timeout occurred. |
| hal_status_t hal_rtc_set_tick_and_start | ( | rtc_handle_t * | p_rtc, |
| uint8_t | mode, | ||
| uint32_t | value | ||
| ) |
Start counting down for tick module.
| [in] | p_rtc | Pointer to a RTC handle which contains the configuration information for the specified RTC module. |
| mode | ONE_TIME/AUTO_RELOAD | |
| value | The tick start which start counting down |
| HAL_OK | Operation is OK. |
| HAL_ERROR | Parameter error or operation not supported. |
| HAL_BUSY | Driver is busy. |
| HAL_TIMEOUT | Timeout occurred. |
| hal_status_t hal_rtc_stop_alarm | ( | rtc_handle_t * | p_rtc | ) |
Stop counting up and compare with alarm_value for alarm module.
| [in] | p_rtc | Pointer to a RTC handle which contains the configuration information for the specified RTC module. |
| HAL_OK | Operation is OK. |
| HAL_ERROR | Parameter error or operation not supported. |
| HAL_BUSY | Driver is busy. |
| HAL_TIMEOUT | Timeout occurred. |
| hal_status_t hal_rtc_stop_tick | ( | rtc_handle_t * | p_rtc | ) |
Stop counting down for tick module.
| [in] | p_rtc | Pointer to a RTC handle which contains the configuration information for the specified RTC module. |
| HAL_OK | Operation is OK. |
| HAL_ERROR | Parameter error or operation not supported. |
| HAL_BUSY | Driver is busy. |
| HAL_TIMEOUT | Timeout occurred. |