Pwm#
- group bsp_pwm
Control the PWM peripherals.
- Author
Alexandre Abadie alexandre.abadie@inria.fr
- Copyright
Inria, 2022
Typedefs
-
typedef uint8_t pwm_t#
PWM peripheral index.
Functions
-
void db_pwm_init(pwm_t pwm, const gpio_t *pins, size_t num_channels, uint16_t mtop)#
Initialize the PWM interface (uses the PWM0 peripheral)
PWM frequency = 10Khz PWM resolution = 100 units (1us resolution)
The number of channels must not exceed the size of the array containing the pins.
- Parameters:
pwm – [in] index of the PWM peripheral to initialize
pins – [in] pointer to array of pointer to GPIO pins
num_channels – [in] number of channels to configure
mtop – [in] max value of the PWM counter register