diff options
Diffstat (limited to 'src/lpc')
-rw-r--r-- | src/lpc/ao_led_lpc.c | 5 | ||||
-rw-r--r-- | src/lpc/ao_timer_lpc.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/lpc/ao_led_lpc.c b/src/lpc/ao_led_lpc.c index 098dad6b..7bef51ba 100644 --- a/src/lpc/ao_led_lpc.c +++ b/src/lpc/ao_led_lpc.c @@ -22,13 +22,13 @@ __pdata uint16_t ao_led_enable; void ao_led_on(uint16_t colors) { - lpc_gpio.pin[LED_PORT] = 0xffffffff; + lpc_gpio.pin[LED_PORT] |= colors; } void ao_led_off(uint16_t colors) { - lpc_gpio.pin[LED_PORT] = 0; + lpc_gpio.pin[LED_PORT] &= ~colors; } void @@ -44,6 +44,7 @@ ao_led_set(uint16_t colors) void ao_led_toggle(uint16_t colors) { + lpc_gpio.pin[LED_PORT] ^= colors; } void diff --git a/src/lpc/ao_timer_lpc.c b/src/lpc/ao_timer_lpc.c index aa796acf..51e82525 100644 --- a/src/lpc/ao_timer_lpc.c +++ b/src/lpc/ao_timer_lpc.c @@ -61,7 +61,7 @@ ao_timer_set_adc_interval(uint8_t interval) } #endif -#define SYSTICK_RELOAD ((AO_LPC_CLKOUT / 2) / 100 - 1) +#define SYSTICK_RELOAD ((AO_LPC_SYSCLK / 2) / 100 - 1) /* Initialize our 100Hz clock */ void |