pwm.h File Reference
#include <cpu/attr.h>#include <cfg/compiler.h>#include "cfg/cfg_pwm.h"#include "drv/PP_CAT3(pwm, _, CPU_ID).h"#include "hw/pwm_map.h"Go to the source code of this file.
Data Structures | |
| struct | Pwm |
| PWM context structure. More... | |
Defines | |
| #define | PWM_MAX_DUTY ((pwm_duty_t)0xFFFF) |
| Maximum PWM duty cycle value (100%). | |
Typedefs | |
| typedef uint16_t | pwm_duty_t |
| Type for PWM duty cycle. | |
| typedef uint32_t | pwm_freq_t |
| Type for PWM frequency. | |
Enumerations | |
| enum | PwmPolarity { PWM_POL_HIGH_PULSE, PWM_POL_POSITIVE = PWM_POL_HIGH_PULSE, PWM_POL_LOW_PULSE, PWM_POL_NEGATIVE = PWM_POL_LOW_PULSE } |
Enum describing PWM polarities. More... | |
Functions | |
| void | pwm_setDuty (Pwm *ctx, pwm_duty_t duty) |
Set the duty cycle of the PWM channel linked to ctx. | |
| void | pwm_setFrequency (Pwm *ctx, pwm_freq_t freq) |
Set PWM frequency of channel linked to ctx. | |
| void | pwm_setPolarity (Pwm *ctx, PwmPolarity pol) |
Set PWM polarity of pwm channel linked to ctx. | |
| void | pwm_enable (Pwm *ctx, bool state) |
Enable/Disable the pwm channel linked to ctx. | |
| void | pwm_init (Pwm *ctx, unsigned channel) |
| Initialize PWM driver. | |
| void | pwm_setPolarity (PwmDev dev, bool pol) |
Set PWM polarity of pwm dev. | |
| void | pwm_setDuty (PwmDev dev, pwm_duty_t duty) |
Set duty of PWM channel dev. | |
| void | pwm_setFrequency (PwmDev dev, pwm_freq_t freq) |
Set frequency of PWM channel dev at freq. | |
| void | pwm_enable (PwmDev dev, bool state) |
Enable/Disable PWM channel dev. | |
| void | pwm_init (void) |
| Initialize the PWM driver. | |
Detailed Description
Definition in file pwm.h.
