BeRTOS
|
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. |
Definition in file pwm.h.