5 /*nothing*/ 1, /*PWM1*/ 1, 15, 3, 17, /*PWM5*/ 11, /*PWM6*/ 19
18 void pwm_channel(int n
, int double_edge
) {
21 PWMPCR
|= (0x100 | (double_edge
&& n
)) << n
;
23 PINSEL1
|= 0x00000400;
24 PINSEL1
&= 0xfffff7ff;
27 bit
= 1 << PWM_PINSEL
[n
];
34 void pwm_set(int n
, uint32_t when
) {
39 void pwm_set_double(int n
, uint32_t from
, uint32_t to
) {
42 PWMLER
|= 0x3 << (n
-1);
45 void pwm_init(uint32_t prescale
, uint32_t period
) {
54 void sync_pwm_timer(uint32_t *tc_addr
) {
61 "add r1, r1, #12 \n\t"
63 : /* no output */ : "r" (tc_addr
), "r" (&PWMTC
)