Functions
Functions
Peripheral Driver » HAL Driver » SLEEP_TIMER
Collaboration diagram for Functions:

## Functions
hal_status_t | hal_sleep_timer_config_and_start (uint8_t mode, uint32_t value)
| Configure the AON Sleep Timer mode, count and start used to wakeup MCU. More...
void | hal_sleep_timer_stop (void)
| stop Sleep Timer More...
uint32_t | hal_sleep_timer_get_current_value (void)
| Get the current value of sleep timer. More...
uint32_t | hal_sleep_timer_get_clock_freq (void)
| Get clock frequency of sleep timer. More...
uint8_t | hal_sleep_timer_status_get (void)
| get sleep timer is running or not More...

## Detailed Description

## Function Documentation

## ◆ hal_sleep_timer_config_and_start()

hal_status_t hal_sleep_timer_config_and_start | ( | uint8_t | mode,
|  | uint32_t | value
| ) |  |

Configure the AON Sleep Timer mode, count and start used to wakeup MCU.

Parameters

  [in] | mode | Specifies the sleep timer mode. This parameter can be a combination of the following values: PWR_SLP_TIMER_MODE_NORMAL PWR_SLP_TIMER_MODE_SINGLE PWR_SLP_TIMER_MODE_RELOAD
  [in] | value | Count value of the AON Sleep Timer.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Operation is ERROR.

## ◆ hal_sleep_timer_get_clock_freq()

uint32_t hal_sleep_timer_get_clock_freq | ( | void |  | ) |

Get clock frequency of sleep timer.

Return values

  clock | frequency of sleep timer

## ◆ hal_sleep_timer_get_current_value()

uint32_t hal_sleep_timer_get_current_value | ( | void |  | ) |

Get the current value of sleep timer.

Return values

  the | current value of sleep timer

## ◆ hal_sleep_timer_status_get()

uint8_t hal_sleep_timer_status_get | ( | void |  | ) |

get sleep timer is running or not

Return values

  runing | state of sleep timer (1 or 0).

## ◆ hal_sleep_timer_stop()

void hal_sleep_timer_stop | ( | void |  | ) |

stop Sleep Timer