diff options
author | Bdale Garbee <bdale@gag.com> | 2014-12-06 15:39:53 -0700 |
---|---|---|
committer | Bdale Garbee <bdale@gag.com> | 2014-12-06 15:39:53 -0700 |
commit | 7339d2379713b5b7e4c4fe6bad89ed93f9d39e82 (patch) | |
tree | 41e653c4014940a0d78900fddd433514b9dbfc66 /src/lpc/ao_led_lpc.c | |
parent | d1f9121593fe30b924223e89ef4d596b5bec2b25 (diff) | |
parent | b6462ca3a7e99fe390ec97f94c23d36fab8c294d (diff) |
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'src/lpc/ao_led_lpc.c')
-rw-r--r-- | src/lpc/ao_led_lpc.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lpc/ao_led_lpc.c b/src/lpc/ao_led_lpc.c index d983437c..a0b293b9 100644 --- a/src/lpc/ao_led_lpc.c +++ b/src/lpc/ao_led_lpc.c @@ -59,6 +59,15 @@ void ao_led_init(AO_PORT_TYPE enable) { ao_led_enable = enable; - lpc_scb.sysahbclkctrl |= (1 << LPC_SCB_SYSAHBCLKCTRL_GPIO); + ao_enable_port(LED_PORT); + if (LED_PORT == 0) { + if (enable & (1 << 11)) + lpc_ioconf.pio0_11 = LPC_IOCONF_FUNC_PIO0_11 | (1 << LPC_IOCONF_ADMODE); + if (enable & (1 << 12)) + lpc_ioconf.pio0_12 = LPC_IOCONF_FUNC_PIO0_12 | (1 << LPC_IOCONF_ADMODE); + if (enable & (1 << 14)) + lpc_ioconf.pio0_14 = LPC_IOCONF_FUNC_PIO0_14 | (1 << LPC_IOCONF_ADMODE); + } lpc_gpio.dir[LED_PORT] |= enable; + ao_led_off(enable); } |