BeRTOS
pwm_avr.h
Go to the documentation of this file.
00001 
00040 #ifndef DRV_PWM_AVR_H
00041 #define DRV_PWM_AVR_H
00042 
00043 #include "hw/pwm_map.h"
00044 
00045 #include <cpu/types.h>
00046 
00047 #define PWM_HW_MAX_PRESCALER_STEP         10
00048 #define PWM_HW_MAX_PERIOD             0xFFFF
00049 
00053 typedef uint16_t pwm_period_t;
00054 
00058 typedef struct PwmChannel
00059 {
00060     /*  */
00061 } PwmChannel;
00062 
00063 
00064 void pwm_hw_init(void);
00065 void pwm_hw_setFrequency(PwmDev dev, uint32_t freq);
00066 void pwm_hw_setDutyUnlock(PwmDev dev, uint16_t duty);
00067 void pwm_hw_disable(PwmDev dev);
00068 void pwm_hw_enable(PwmDev dev);
00069 void pwm_hw_setPolarity(PwmDev dev, bool pol);
00070 pwm_period_t pwm_hw_getPeriod(PwmDev dev);
00071 
00072 #endif /* DRV_ADC_AT91_H */