/** * \file * * * \brief Low-level PWM module for AVR (interface). * * * \author Daniele Basile * */ #ifndef DRV_PWM_AVR_H #define DRV_PWM_AVR_H #include "hw/pwm_map.h" #include #define PWM_HW_MAX_PRESCALER_STEP 10 #define PWM_HW_MAX_PERIOD 0xFFFF /** * Type definition for pwm period. */ typedef uint16_t pwm_period_t; /** * Structur definition for pwm driver. */ typedef struct PwmChannel { /* */ } PwmChannel; void pwm_hw_init(void); void pwm_hw_setFrequency(PwmDev dev, uint32_t freq); void pwm_hw_setDutyUnlock(PwmDev dev, uint16_t duty); void pwm_hw_disable(PwmDev dev); void pwm_hw_enable(PwmDev dev); void pwm_hw_setPolarity(PwmDev dev, bool pol); pwm_period_t pwm_hw_getPeriod(PwmDev dev); #endif /* DRV_ADC_AT91_H */