summaryrefslogtreecommitdiff
path: root/software
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2015-04-09 21:07:19 (GMT)
committerChristian Pointner <equinox@helsinki.at>2015-04-09 21:07:19 (GMT)
commit37bdd9cf9fb11f532994a25eded6b674a808e678 (patch)
treefdbe6772d12dbf044134d6a6e28095ef499a3e58 /software
parent2731ff242cc6bb5cd4a1a5b61625c28fdfb7441f (diff)
some cleanup
Diffstat (limited to 'software')
-rw-r--r--software/rhmixxx/keypad.c5
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;
}
}