![]() |
ChibiOS/RT Architecture - Reference Manual - Guides |
PWM Driver subsystem low level driver header template. More...
Go to the source code of this file.
Data Structures | |
| struct | PWMChannelConfig |
| PWM driver channel configuration structure. More... | |
| struct | PWMConfig |
| Driver configuration structure. More... | |
| struct | PWMDriver |
| Structure representing an PWM driver. More... | |
Defines | |
| #define | PWM_CHANNELS 1 |
| Number of PWM channels per PWM driver. | |
| #define | PWM_FRACTION_TO_WIDTH(pwmp, numerator, denominator) 0 |
| Converts from fraction to pulse width. | |
| #define | PWM_DEGREES_TO_WIDTH(pwmp, degrees) PWM_FRACTION_TO_WIDTH(pwmp, 36000, degrees) |
| Converts from degrees to pulse width. | |
| #define | PWM_PERCENTAGE_TO_WIDTH(pwmp, percentage) PWM_FRACTION_TO_WIDTH(pwmp, 10000, percentage) |
| Converts from percentage to pulse width. | |
Typedefs | |
| typedef uint8_t | pwmchannel_t |
| PWM channel type. | |
| typedef uint16_t | pwmcnt_t |
| PWM counter type. | |
| typedef struct PWMDriver | PWMDriver |
| Type of a structure representing an PWM driver. | |
| typedef void(* | pwmcallback_t )(PWMDriver *pwmp) |
| PWM notification callback type. | |
Functions | |
| void | pwm_lld_init (void) |
| Low level PWM driver initialization. | |
| void | pwm_lld_start (PWMDriver *pwmp) |
| Configures and activates the PWM peripheral. | |
| void | pwm_lld_stop (PWMDriver *pwmp) |
| Deactivates the PWM peripheral. | |
| bool_t | pwm_lld_is_enabled (PWMDriver *pwmp, pwmchannel_t channel) |
| Determines whatever the PWM channel is already enabled. | |
| void | pwm_lld_enable_channel (PWMDriver *pwmp, pwmchannel_t channel, pwmcnt_t width) |
| Enables a PWM channel. | |
| void | pwm_lld_disable_channel (PWMDriver *pwmp, pwmchannel_t channel) |
| Disables a PWM channel. | |
PWM Driver subsystem low level driver header template.
Definition in file templates/pwm_lld.h.
1.7.1