4 volatile uint32_t *ioset
, *ioclr
, bit
;
6 {(uint32_t*)&IOSET0
, (uint32_t*)&IOCLR0
, 1<<22},
7 {(uint32_t*)&IOSET0
, (uint32_t*)&IOCLR0
, 1<<23},
8 {(uint32_t*)&IOSET0
, (uint32_t*)&IOCLR0
, 1<<24},
9 {(uint32_t*)&IOSET1
, (uint32_t*)&IOCLR1
, 1<<19}
13 PINSEL1
&= ~0x0003f000;
14 PINSEL2
&= ~0x00000008;
21 void led_set(uint8_t led
, uint8_t state
) {
23 *led_ctl
[led
].ioset
= led_ctl
[led
].bit
;
25 *led_ctl
[led
].ioclr
= led_ctl
[led
].bit
;
28 void led_toggle(uint8_t led
) {
29 if ((*led_ctl
[led
].ioset
) & led_ctl
[led
].bit
)
30 *led_ctl
[led
].ioclr
= led_ctl
[led
].bit
;
32 *led_ctl
[led
].ioset
= led_ctl
[led
].bit
;