Functions
Functions
Peripheral Driver » APP DRIVER » PWM

## Functions
uint16_t | app_pwm_init (app_pwm_params_t *p_params)
| Initialize the APP PWM DRIVER. More...
uint16_t | app_pwm_deinit (app_pwm_id_t id)
| De-initialize the APP PWM DRIVER. More...
uint16_t | app_pwm_start (app_pwm_id_t id)
| Starts the PWM signal generation on the output. More...
uint16_t | app_pwm_stop (app_pwm_id_t id)
| Stops the PWM signal generation on the output. More...
uint16_t | app_pwm_update_freq (app_pwm_id_t id, uint32_t freq)
| Update the PWM frequency on the output. More...
uint16_t | app_pwm_config_channel (app_pwm_id_t id, app_pwm_active_channel_t channel, app_pwm_channel_init_t *p_config)
| Initialize the PWM channels according to the specified parameters. More...
uint16_t | app_pwm_inactive_channel (app_pwm_id_t id, app_pwm_active_channel_t channel)
| Set the specified PWM channel inactive. More...
pwm_handle_t * | app_pwm_get_handle (app_pwm_id_t id)
| Return the PWM handle. More...

## Detailed Description

## Function Documentation

## ◆ app_pwm_config_channel()

uint16_t app_pwm_config_channel | ( | app_pwm_id_t | id,
|  | app_pwm_active_channel_t | channel,
|  | app_pwm_channel_init_t * | p_config
| ) |  |

Initialize the PWM channels according to the specified parameters.

Parameters

  [in] | id | which PWM module want to config.
  [in] | channel | PWM Channels to be configured.
  [in] | p_config | PWM Channels configuration structure.

Returns
  Result of operation.

## ◆ app_pwm_deinit()

uint16_t app_pwm_deinit | ( | app_pwm_id_t | id | ) |

De-initialize the APP PWM DRIVER.

Parameters

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

Returns
  Result of De-initialization.

## ◆ app_pwm_get_handle()

pwm_handle_t* app_pwm_get_handle | ( | app_pwm_id_t | id | ) |

Return the PWM handle.

Parameters

  [in] | id | PWM ID.

Returns
  Pointer to the specified ID's PWM handle.

## ◆ app_pwm_inactive_channel()

uint16_t app_pwm_inactive_channel | ( | app_pwm_id_t | id,
|  | app_pwm_active_channel_t | channel
| ) |  |

Set the specified PWM channel inactive.

Parameters

  [in] | id | PWM ID.
  [in] | channel | PWM Channels to be configured.

Returns
  Result of operation.

## ◆ app_pwm_init()

uint16_t app_pwm_init | ( | app_pwm_params_t * | p_params | ) |

Initialize the APP PWM DRIVER.

Parameters

  [in] | p_params | Pointer to app_pwm_params_t parameter which contains the configuration information for the specified PWM module.

Returns
  Result of initialization.

## ◆ app_pwm_start()

uint16_t app_pwm_start | ( | app_pwm_id_t | id | ) |

Starts the PWM signal generation on the output.

Parameters

  [in] | id | which PWM module want to output.

Returns
  Result of operation.

## ◆ app_pwm_stop()

uint16_t app_pwm_stop | ( | app_pwm_id_t | id | ) |

Stops the PWM signal generation on the output.

Parameters

  [in] | id | which PWM module want to stop output.

Returns
  Result of operation.

## ◆ app_pwm_update_freq()

uint16_t app_pwm_update_freq | ( | app_pwm_id_t | id,
|  | uint32_t | freq
| ) |  |

Update the PWM frequency on the output.

Parameters

  [in] | id | which PWM module want to config.
  [in] | freq | This parameter ranges between min = 0 and max = SystemFreq / 2.

Returns
  Result of operation.