Go to the documentation of this file.
61 #ifdef HAL_PWM_MODULE_ENABLED
67 #define APP_PWM_PIN_ENABLE 1
68 #define APP_PWM_PIN_DISABLE 0
@ APP_PWM_ACTIVE_CHANNEL_A
The active channel is A
PWM Channel init Structure definition.
pwm_init_t init
PWM communication parameters.
app_pwm_pin_t channel_a
Set the configuration of PWM channel A pin.
app_pwm_pin_t channel_b
Set the configuration of PWM channel B pin.
app_pwm_active_channel_t
PWM active channel Enumerations definition.
PWM IO configuration Structures.
PWM init Structure definition.
uint16_t app_pwm_update_freq(app_pwm_id_t id, uint32_t freq)
Update the PWM frequency on the output.
uint8_t enable
Enable or disable the pin.
uint32_t pin
Specifies the IO pins to be configured.
@ APP_PWM_ACTIVE_CHANNEL_ALL
The active channels are ALL.
uint16_t app_pwm_init(app_pwm_params_t *p_params)
Initialize the pwm peripheral.
app_io_pull_t
GPIO pull Enumerations definition.
app_io_type_t
GPIO type Enumerations definition.
@ APP_PWM_ACTIVE_CHANNEL_C
The active channel is C
app_pwm_id_t id
specified PWM module ID.
@ APP_PWM_ID_0
PWM module 0.
Header file containing functions prototypes of GPIO app library.
uint16_t app_pwm_start(app_pwm_id_t id)
Starts the PWM signal generation on the output.
app_io_pull_t pull
Specifies the Pull-up or Pull-Down activation for the selected pins.
app_pwm_id_t
PWM module Enumerations definition.
@ APP_PWM_ID_1
PWM module 1.
uint16_t app_pwm_stop(app_pwm_id_t id)
Stops the PWM signal generation on the output.
@ APP_PWM_ACTIVE_CHANNEL_B
The active channel is B
uint8_t duty
Specifies the duty in PWM output mode.
uint8_t drive_polarity
Specifies the drive polarity in PWM output mode.
PWM parameters structure definition.
This file contains all the functions prototypes for the HAL module driver.
PWM configuration Structures.
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.
uint32_t channel
Which channel to be sample; This parameter can be any value of ADC_INPUT_SOURCE:ADC_INPUT_SRC_IO0~ADC...
app_io_type_t type
Specifies the type of PWM IO.
app_io_mux_t
GPIO mux Enumerations definition.
app_pwm_pin_cfg_t pin_cfg
the pin configuration information for the specified PWM module.
@ APP_PWM_ID_MAX
Only for check parameter, not used as input parameters.
uint16_t app_pwm_deinit(app_pwm_id_t id)
De-initialize the pwm peripheral.
app_pwm_pin_t channel_c
Set the configuration of PWM channel C pin.
app_pwm_active_channel_t active_channel
PWM operate mode.
Header file of app driver error code.
app_io_mux_t mux
Specifies the Peripheral to be connected to the selected pins.
@ APP_PWM_ACTIVE_CHANNEL_CLEARED
All active channels are cleared.