IO operation functions.
More...
|
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_resume (pwm_handle_t *p_pwm) |
| Resume the PWM signal generation on the output. More...
|
|
hal_status_t | hal_pwm_pause (pwm_handle_t *p_pwm) |
| Pause 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_none_coding_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...
|
|
hal_status_t | hal_pwm_set_coding_data_in_one_channel (pwm_handle_t *p_pwm, uint32_t coding_data) |
| Set pwm coding data. More...
|
|
hal_status_t | hal_pwm_set_coding_data_in_three_channels (pwm_handle_t *p_pwm, uint32_t coding_data0, uint32_t coding_data1, uint32_t coding_data2) |
| Set pwm coding data. More...
|
|
hal_status_t | hal_pwm_start_coding_with_dma (pwm_handle_t *p_pwm, uint32_t *p_data, uint16_t size) |
| Start generate wave form in DMA mode. More...
|
|
hal_status_t | hal_pwm_start_coding_in_one_channel (pwm_handle_t *p_pwm, uint32_t coding_data) |
| Start generate one channel wave form in Interrupt mode. More...
|
|
hal_status_t | hal_pwm_start_coding_in_three_channels (pwm_handle_t *p_pwm, uint32_t coding_data0, uint32_t coding_data1, uint32_t coding_data2) |
| Start generate three channels wave form in Interrupt mode. More...
|
|
void | hal_pwm_irq_handler (pwm_handle_t *p_pwm) |
| PWM irq handler. More...
|
|
hal_pwm_state_t | hal_pwm_get_state (pwm_handle_t *p_pwm) |
| Return the PWM handle state. 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_pwm_config_channel()
Initialize the PWM channels according to the specified parameters in the pwm_init_t.
- Parameters
-
[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:
|
- Return values
-
◆ hal_pwm_get_state()
Return the PWM handle state.
- Parameters
-
[in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module. |
- Return values
-
◆ hal_pwm_inactive_channel()
Set the specified PWM channel inactive.
- Parameters
-
[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. |
- Return values
-
◆ hal_pwm_irq_handler()
PWM irq handler.
- Parameters
-
[in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module. |
- Return values
-
◆ hal_pwm_pause()
Pause the PWM signal generation on the output.
- Parameters
-
[in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module. |
- Return values
-
◆ hal_pwm_resume()
Resume the PWM signal generation on the output.
- Parameters
-
[in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module. |
- Return values
-
◆ hal_pwm_resume_reg()
Restore some registers related to PWM configuration after sleep. This function must be used in conjunction with the hal_pwm_suspend_reg().
- Parameters
-
[in] | p_pwm | Pointer to a PWM handle which contains the configuration information for the specified PWM module. |
- Return values
-
◆ hal_pwm_set_coding_data_in_one_channel()
Set pwm coding data.
- Parameters
-
[in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module. |
[in] | coding_data | every bit represent compa0 or compa1 in coding data. |
- Return values
-
◆ hal_pwm_set_coding_data_in_three_channels()
hal_status_t hal_pwm_set_coding_data_in_three_channels |
( |
pwm_handle_t * |
p_pwm, |
|
|
uint32_t |
coding_data0, |
|
|
uint32_t |
coding_data1, |
|
|
uint32_t |
coding_data2 |
|
) |
| |
Set pwm coding data.
- Parameters
-
[in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module. |
[in] | coding_data0 | every bit represent compa0 or compa1 in coding data0. |
[in] | coding_data1 | every bit represent compb0 or compb1 in coding data1. |
[in] | coding_data2 | every bit represent compc0 or compc1 in coding data2. |
- Return values
-
◆ hal_pwm_start()
Starts the PWM signal generation on the output.
- Parameters
-
[in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module. |
- Return values
-
◆ hal_pwm_start_coding_in_one_channel()
Start generate one channel wave form in Interrupt mode.
- Parameters
-
[in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module. |
[in] | coding_data | every bit represent compa0 or compa1 in coding data0. |
- Return values
-
◆ hal_pwm_start_coding_in_three_channels()
hal_status_t hal_pwm_start_coding_in_three_channels |
( |
pwm_handle_t * |
p_pwm, |
|
|
uint32_t |
coding_data0, |
|
|
uint32_t |
coding_data1, |
|
|
uint32_t |
coding_data2 |
|
) |
| |
Start generate three channels wave form in Interrupt mode.
- Parameters
-
[in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module. |
[in] | coding_data0 | every bit represent compa0 or compa1 in coding data0. |
[in] | coding_data1 | every bit represent compb0 or compb1 in coding data1. |
[in] | coding_data2 | every bit represent compc0 or compc1 in coding data2. |
- Return values
-
◆ hal_pwm_start_coding_with_dma()
Start generate wave form in DMA mode.
- Parameters
-
[in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module. |
[in] | p_data | the coding data address. |
[in] | size | coding data size. |
- Return values
-
◆ hal_pwm_stop()
Stops the PWM signal generation on the output.
- Parameters
-
[in] | p_pwm | Pointer to a PWM handle that contains the configuration information for the specified PWM module. |
- Return values
-
◆ hal_pwm_suspend_reg()
Suspend some registers related to PWM configuration before sleep.
- Parameters
-
[in] | p_pwm | Pointer to a PWM handle which contains the configuration information for the specified PWM module. |
- Return values
-
◆ hal_pwm_update_freq()
Update the PWM frequency on the output.
- Parameters
-
[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. |
- Return values
-