4 /*nothing*/ 1, /*PWM1*/ 1, 15, 3, 17, /*PWM5*/ 11, /*PWM6*/ 19
17 void pwm_channel(int n
, int double_edge
) {
20 PWMPCR
|= (0x100 | (double_edge
&& n
)) << n
;
22 PINSEL1
|= 0x00000400;
23 PINSEL1
&= 0xfffff7ff;
26 bit
= 1 << PWM_PINSEL
[n
];
33 void pwm_set(int n
, uint32_t when
) {
38 void pwm_set_double(int n
, uint32_t from
, uint32_t to
) {
41 PWMLER
|= 0x3 << (n
-1);
44 void pwm_init(uint32_t prescale
, uint32_t period
) {