Functions
Functions
Peripheral Driver » APP DRIVER » DUAL TIMER

## Functions
uint16_t | app_dual_tim_init (app_dual_tim_params_t *p_params, app_dual_tim_evt_handler_t evt_handler)
| Initialize the APP DUAL TIM DRIVER according to the specified parameters in the app_dual_tim_params_t and app_dual_tim_evt_handler_t. More...
uint16_t | app_dual_tim_deinit (app_dual_tim_id_t id)
| De-initialize the APP DUAL TIM DRIVER peripheral. More...
uint16_t | app_dual_tim_start (app_dual_tim_id_t id)
| Starts the DUAL TIM counter in interrupt mode. More...
uint16_t | app_dual_tim_stop (app_dual_tim_id_t id)
| Stops the DUAL TIM counter in interrupt mode. More...
uint16_t | app_dual_tim_set_params (app_dual_tim_params_t *p_params, app_dual_tim_id_t id)
| Set the APP DUAL TIM according to the specified parameters. More...
uint16_t | app_dual_tim_set_background_reload (app_dual_tim_id_t id, uint32_t reload_value)
| Set the APP DUAL TIM background reload value The background reload value contains the value from which the counter is to decrement. This is the value used to reload the counter when Periodic mode is enabled, and the current count reaches 0. More...
dual_timer_handle_t * | app_dual_tim_get_handle (app_dual_tim_id_t id)
| Return the DUAL TIM handle. More...
uint16_t | app_dual_tim_set_reload_value_bg_reload_value (app_dual_tim_id_t id, uint32_t reload_value, uint32_t bg_reload_value)
| Set the APP DUAL TIM background reload value and current reload value The background reload value contains the value from which the counter is to decrement. This is the value used to reload the counter when Periodic mode is enabled, and the current count reaches 0. More...
uint32_t | app_dual_tim_get_counter_value (app_dual_tim_id_t id)
| Return the DUAL TIM counter. More...

## Detailed Description

## Function Documentation

## ◆ app_dual_tim_deinit()

uint16_t app_dual_tim_deinit | ( | app_dual_tim_id_t | id | ) |

De-initialize the APP DUAL TIM DRIVER peripheral.

Parameters

  [in] | id | De-initialize for a specific ID.

Returns
  Result of De-initialization.

## ◆ app_dual_tim_get_counter_value()

uint32_t app_dual_tim_get_counter_value | ( | app_dual_tim_id_t | id | ) |

Return the DUAL TIM counter.

Parameters

  [in] | id | DUAL TIM Channel ID.

Returns
  DUAL TIM Counter.

## ◆ app_dual_tim_get_handle()

dual_timer_handle_t* app_dual_tim_get_handle | ( | app_dual_tim_id_t | id | ) |

Return the DUAL TIM handle.

Parameters

  [in] | id | DUAL TIM Channel ID.

Returns
  Pointer to the specified ID's DUAL TIM handle.

## ◆ app_dual_tim_init()

uint16_t app_dual_tim_init | ( | app_dual_tim_params_t * | p_params,
|  | app_dual_tim_evt_handler_t | evt_handler
| ) |  |

Initialize the APP DUAL TIM DRIVER according to the specified parameters in the app_dual_tim_params_t and app_dual_tim_evt_handler_t.

Parameters

  [in] | p_params | Pointer to app_dual_tim_params_t parameter which contains the configuration information for the specified DUAL TIM module.
  [in] | evt_handler | DUAL TIM user callback function.

Returns
  Result of initialization.

## ◆ app_dual_tim_set_background_reload()

uint16_t app_dual_tim_set_background_reload | ( | app_dual_tim_id_t | id,
|  | uint32_t | reload_value
| ) |  |

Set the APP DUAL TIM background reload value The background reload value contains the value from which the counter is to decrement. This is the value used to reload the counter when Periodic mode is enabled, and the current count reaches 0.

Parameters

  [in] | id | A specific timer ID which can be APP_DUAL_TIM_ID_0 or APP_DUAL_TIM_ID_1
  [in] | reload_value | Background reload value

Returns
  Result of execution.

## ◆ app_dual_tim_set_params()

uint16_t app_dual_tim_set_params | ( | app_dual_tim_params_t * | p_params,
|  | app_dual_tim_id_t | id
| ) |  |

Set the APP DUAL TIM according to the specified parameters.

Parameters

  [in] | p_params | Pointer to app_dual_tim_params_t parameter which contains the configuration information for the specified DUAL TIM module.
  [in] | id | A specific timer ID which can be APP_DUAL_TIM_ID_0 or APP_DUAL_TIM_ID_1

Returns
  Result of execution.

## ◆ app_dual_tim_set_reload_value_bg_reload_value()

uint16_t app_dual_tim_set_reload_value_bg_reload_value | ( | app_dual_tim_id_t | id,
|  | uint32_t | reload_value,
|  | uint32_t | bg_reload_value
| ) |  |

Set the APP DUAL TIM background reload value and current reload value The background reload value contains the value from which the counter is to decrement. This is the value used to reload the counter when Periodic mode is enabled, and the current count reaches 0.

Parameters

  [in] | id | A specific timer ID which can be APP_DUAL_TIM_ID_0 or APP_DUAL_TIM_ID_1
  [in] | reload_value | current reload value
  [in] | bg_reload_value | Background reload value

Returns
  Result of execution.

## ◆ app_dual_tim_start()

uint16_t app_dual_tim_start | ( | app_dual_tim_id_t | id | ) |

Starts the DUAL TIM counter in interrupt mode.

Parameters

  [in] | id | which DUAL TIM module want to start.

Returns
  Result of execution.

## ◆ app_dual_tim_stop()

uint16_t app_dual_tim_stop | ( | app_dual_tim_id_t | id | ) |

Stops the DUAL TIM counter in interrupt mode.

Parameters

  [in] | id | which DUAL TIM module want to stop.

Returns
  Result of execution.