2 * pwm.h - arm pwm interface header file
4 * author: hackbard@hackdaworld.org
15 #define pwm_enable PWMTCR=0x0b
18 #define PWM_SINGLE_EDGE 0x00
19 #define PWM_DOUBLE_EDGE 0x01
21 #define PWM_MATCH_INTERRUPT 0x01
22 #define PWM_MATCH_RESET 0x02
23 #define PWM_MATCH_STOP 0x04
26 #define PWM_INVALID_CHAN 0x01
27 #define PWM_STUPID 0x02
37 /* function prototypes */
39 void pwm_set_rate_and_prescaler(u32 rate,u32 prescaler);
40 int pwm_config(u8 pwmchan,u8 mode,u32 val1,u32 val2);
41 int pwm_update_match(u8 pwmchan,u8 mode,u32 val1,u32 val2);
42 void pwm_match_ctrl_config(u8 matchreg,u8 ctrl);