diff options
Diffstat (limited to 'software')
-rw-r--r-- | software/rhmixxx/keypad.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/software/rhmixxx/keypad.c b/software/rhmixxx/keypad.c index 57a6380..fdb31dd 100644 --- a/software/rhmixxx/keypad.c +++ b/software/rhmixxx/keypad.c @@ -39,6 +39,7 @@ static struct { uint16_t delay; uint16_t cnt; } led_blink_state[KEYPAD_NUM_KEYS]; +#define KEYPAD_BLINK_DELAY_MULT 64 void keypad_init(void) { @@ -136,12 +137,12 @@ void keypad_led_toggle(uint8_t led) void keypad_led_blink(uint8_t led, uint8_t value) { if(led < KEYPAD_NUM_KEYS) { - led_blink_state[led].delay = value * 64; + led_blink_state[led].delay = value * KEYPAD_BLINK_DELAY_MULT; led_blink_state[led].cnt = 0; } else { uint8_t i; for(i = 0; i < KEYPAD_NUM_KEYS; ++i) { - led_blink_state[i].delay = value * 64; + led_blink_state[i].delay = value * KEYPAD_BLINK_DELAY_MULT; led_blink_state[i].cnt = 0; } } |