Functions
Initialization and de-initialization functions
Peripheral Driver » HAL Driver » PWM » Functions

Initialization and de-initialization functions. More...

Collaboration diagram for Initialization and de-initialization functions:

## Functions
hal_status_t | hal_pwm_init (pwm_handle_t *p_pwm)
| Initialize the PWM mode according to the specified parameters in the pwm_init_t and initialize the associated handle. More...
hal_status_t | hal_pwm_deinit (pwm_handle_t *p_pwm)
| De-initialize the PWM peripheral. More...
void | hal_pwm_msp_init (pwm_handle_t *p_pwm)
| Initialize the PWM MSP. More...
void | hal_pwm_msp_deinit (pwm_handle_t *p_pwm)
| De-initialize the PWM MSP. More...

## Detailed Description

Initialization and de-initialization functions.

    ===============================================================================
                ##### Initialization and de-initialization functions #####
     ===============================================================================
        [..]
        This subsection provides a set of functions allowing to initialize the PWMx.
          (+) The parameters below can only be configured in breath mode:
            (++) BreathPeriod
            (++) HoldPeriod

## Function Documentation

## ◆ hal_pwm_deinit()

hal_status_t hal_pwm_deinit | ( | pwm_handle_t * | p_pwm | ) |

De-initialize the PWM peripheral.

Parameters

  [in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module.

Return values

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

## ◆ hal_pwm_init()

hal_status_t hal_pwm_init | ( | pwm_handle_t * | p_pwm | ) |

Initialize the PWM mode according to the specified parameters in the pwm_init_t and initialize the associated handle.

Parameters

  [in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module.

Return values

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

## ◆ hal_pwm_msp_deinit()

void hal_pwm_msp_deinit | ( | pwm_handle_t * | p_pwm | ) |

De-initialize the PWM MSP.

Note
  This function should not be modified. When the callback is needed, the hal_pwm_msp_deinit can be implemented in the user file.

Parameters

  [in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module.

## ◆ hal_pwm_msp_init()

void hal_pwm_msp_init | ( | pwm_handle_t * | p_pwm | ) |

Initialize the PWM MSP.

Note
  This function should not be modified. When the callback is needed, the hal_pwm_msp_init can be implemented in the user file.

Parameters

  [in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module.