IO operation functions. More...
Functions | |
| hal_status_t | hal_pwm_start (pwm_handle_t *p_pwm) |
| Starts the PWM signal generation on the output. More... | |
| hal_status_t | hal_pwm_stop (pwm_handle_t *p_pwm) |
| Stops the PWM signal generation on the output. More... | |
| hal_status_t | hal_pwm_update_freq (pwm_handle_t *p_pwm, uint32_t freq) |
| Update the PWM frequency on the output. More... | |
| hal_status_t | hal_pwm_suspend_reg (pwm_handle_t *p_pwm) |
| Suspend some registers related to PWM configuration before sleep. More... | |
| hal_status_t | hal_pwm_resume_reg (pwm_handle_t *p_pwm) |
| Restore some registers related to PWM configuration after sleep. This function must be used in conjunction with the hal_pwm_suspend_reg(). More... | |
| hal_status_t | hal_pwm_config_channel (pwm_handle_t *p_pwm, pwm_channel_init_t *p_config, hal_pwm_active_channel_t channel) |
| Initialize the PWM channels according to the specified parameters in the pwm_init_t. More... | |
| hal_status_t | hal_pwm_inactive_channel (pwm_handle_t *p_pwm, hal_pwm_active_channel_t channel) |
| Set the specified PWM channel inactive. More... | |
IO operation functions.
==============================================================================
##### IO operation functions #####
==============================================================================
[..]
This section provides functions allowing to:
(+) Start the PWM.
(+) Stop the PWM.
(+) Configure the specified PWM channel. | hal_status_t hal_pwm_config_channel | ( | pwm_handle_t * | p_pwm, |
| pwm_channel_init_t * | p_config, | ||
| hal_pwm_active_channel_t | channel | ||
| ) |
Initialize the PWM channels according to the specified parameters in the pwm_init_t.
| [in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module. |
| [in] | p_config | PWM Channels configuration structure. |
| [in] | channel | PWM Channels to be configured. This parameter can be one of the following values:
|
| HAL_OK | Operation is OK. |
| HAL_ERROR | Parameter error or operation not supported. |
| HAL_BUSY | Driver is busy. |
| HAL_TIMEOUT | Timeout occurred. |
| hal_status_t hal_pwm_inactive_channel | ( | pwm_handle_t * | p_pwm, |
| hal_pwm_active_channel_t | channel | ||
| ) |
Set the specified PWM channel inactive.
| [in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module. |
| [in] | channel | PWM Channels to be configured. |
| HAL_OK | Operation is OK. |
| HAL_ERROR | Parameter error or operation not supported. |
| HAL_BUSY | Driver is busy. |
| HAL_TIMEOUT | Timeout occurred. |
| hal_status_t hal_pwm_resume_reg | ( | pwm_handle_t * | p_pwm | ) |
Restore some registers related to PWM configuration after sleep. This function must be used in conjunction with the hal_pwm_suspend_reg().
| [in] | p_pwm | Pointer to a PWM handle which contains the configuration information for the specified PWM module. |
| HAL_OK | Operation is OK. |
| HAL_ERROR | Parameter error or operation not supported. |
| HAL_BUSY | Driver is busy. |
| HAL_TIMEOUT | Timeout occurred. |
| hal_status_t hal_pwm_start | ( | pwm_handle_t * | p_pwm | ) |
Starts the PWM signal generation on the output.
| [in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module. |
| HAL_OK | Operation is OK. |
| HAL_ERROR | Parameter error or operation not supported. |
| HAL_BUSY | Driver is busy. |
| HAL_TIMEOUT | Timeout occurred. |
| hal_status_t hal_pwm_stop | ( | pwm_handle_t * | p_pwm | ) |
Stops the PWM signal generation on the output.
| [in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module. |
| HAL_OK | Operation is OK. |
| HAL_ERROR | Parameter error or operation not supported. |
| HAL_BUSY | Driver is busy. |
| HAL_TIMEOUT | Timeout occurred. |
| hal_status_t hal_pwm_suspend_reg | ( | pwm_handle_t * | p_pwm | ) |
Suspend some registers related to PWM configuration before sleep.
| [in] | p_pwm | Pointer to a PWM handle which contains the configuration information for the specified PWM module. |
| HAL_OK | Operation is OK. |
| HAL_ERROR | Parameter error or operation not supported. |
| HAL_BUSY | Driver is busy. |
| HAL_TIMEOUT | Timeout occurred. |
| hal_status_t hal_pwm_update_freq | ( | pwm_handle_t * | p_pwm, |
| uint32_t | freq | ||
| ) |
Update the PWM frequency on the output.
| [in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module. |
| [in] | freq | This parameter ranges between min = 0 and max = SystemFreq / 2. |
| HAL_OK | Operation is OK. |
| HAL_ERROR | Parameter error or operation not supported. |
| HAL_BUSY | Driver is busy. |
| HAL_TIMEOUT | Timeout occurred. |