Functions
Peripheral Control and State functions
Peripheral Driver » HAL Driver » TIMER » Functions

TIMER Peripheral State functions. More...

## Functions
hal_timer_state_t | hal_timer_get_state (timer_handle_t *p_timer)
| Return the TIMER handle state. More...
hal_status_t | hal_timer_set_config (timer_handle_t *p_timer, timer_init_t *p_structure)
| TIMER configuration. More...
uint32_t | hal_timer_get_channel0_val (timer_handle_t *p_timer)
| Get current value of channel0. More...
uint32_t | hal_timer_get_channel1_val (timer_handle_t *p_timer)
| Get current value of channel1. More...
uint32_t | hal_timer_get_channel2_val (timer_handle_t *p_timer)
| Get current value of channel2. More...
uint32_t | hal_timer_get_channel3_val (timer_handle_t *p_timer)
| Get current value of channel3. More...

## Detailed Description

TIMER Peripheral State functions.

      ==============================================================================
                ##### Peripheral Control and State functions #####
      ==============================================================================
        [..]
        This subsection provides functions allowing to :
          (+) Return the TIMER handle state.
          (+) Configure the TIMER.

## Function Documentation

## ◆ hal_timer_get_channel0_val()

uint32_t hal_timer_get_channel0_val | ( | timer_handle_t * | p_timer | ) |

Get current value of channel0.

Parameters

  [in] | p_timer | Pointer to a TIMER handle which contains the configuration information for the specified TIMER module.

Return values

  ::Current | timer value

## ◆ hal_timer_get_channel1_val()

uint32_t hal_timer_get_channel1_val | ( | timer_handle_t * | p_timer | ) |

Get current value of channel1.

Parameters

  [in] | p_timer | Pointer to a TIMER handle which contains the configuration information for the specified TIMER module.

Return values

  ::Current | timer value

## ◆ hal_timer_get_channel2_val()

uint32_t hal_timer_get_channel2_val | ( | timer_handle_t * | p_timer | ) |

Get current value of channel2.

Parameters

  [in] | p_timer | Pointer to a TIMER handle which contains the configuration information for the specified TIMER module.

Return values

  ::Current | timer value

## ◆ hal_timer_get_channel3_val()

uint32_t hal_timer_get_channel3_val | ( | timer_handle_t * | p_timer | ) |

Get current value of channel3.

Parameters

  [in] | p_timer | Pointer to a TIMER handle which contains the configuration information for the specified TIMER module.

Return values

  ::Current | timer value

## ◆ hal_timer_get_state()

hal_timer_state_t hal_timer_get_state | ( | timer_handle_t * | p_timer | ) |

Return the TIMER handle state.

Parameters

  [in] | p_timer | Pointer to a TIMER handle which contains the configuration information for the specified TIMER module.

Return values

  HAL_TIMER_STATE_RESET | Peripheral not yet initialized or disabled.
  HAL_TIMER_STATE_READY | Peripheral Initialized and ready for use.
  HAL_TIMER_STATE_BUSY | An internal process is ongoing.
  HAL_TIMER_STATE_ERROR | Reception process is ongoing.

## ◆ hal_timer_set_config()

hal_status_t hal_timer_set_config | ( | timer_handle_t * | p_timer,
|  | timer_init_t * | p_structure
| ) |  |

TIMER configuration.

Parameters

  [in] | p_timer | Pointer to a TIMER handle which contains the configuration information for the specified TIMER module.
  [in] | p_structure | The TIMER configuration structure

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.