diff options
Diffstat (limited to 'firmware/drivers/button.c')
-rw-r--r-- | firmware/drivers/button.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index 25cdd3d96b..263dce4d16 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c | |||
@@ -385,42 +385,6 @@ static int button_read(void) | |||
385 | return btn; | 385 | return btn; |
386 | } | 386 | } |
387 | 387 | ||
388 | #elif defined(HAVE_NEO_KEYPAD) | ||
389 | static bool mStation = false; | ||
390 | void button_init(void) | ||
391 | { | ||
392 | /* set port pins as input */ | ||
393 | PAIOR &= ~0x4000; /* PA14 for stop button */ | ||
394 | |||
395 | queue_init(&button_queue); | ||
396 | lastbtn = 0; | ||
397 | tick_add_task(button_tick); | ||
398 | |||
399 | reset_poweroff_timer(); | ||
400 | } | ||
401 | int button_read(void) | ||
402 | { | ||
403 | int btn=BUTTON_NONE; | ||
404 | |||
405 | btn|=((~PCDR)&0xFF); | ||
406 | |||
407 | /* mStation does not have a stop button and this floods the button queue | ||
408 | with stops if used on a mStation */ | ||
409 | if (!mStation) | ||
410 | btn|=((~(PADR>>6))&0x100); | ||
411 | |||
412 | return btn; | ||
413 | } | ||
414 | |||
415 | /* This function adds a button press event to the button queue, and this | ||
416 | really isn't anything Neo-specific but might be subject for adding to | ||
417 | the generic button driver */ | ||
418 | int button_add(unsigned int button) | ||
419 | { | ||
420 | queue_post(&button_queue,button,NULL); | ||
421 | return 1; | ||
422 | } | ||
423 | |||
424 | #elif defined HAVE_ONDIO_KEYPAD | 388 | #elif defined HAVE_ONDIO_KEYPAD |
425 | 389 | ||
426 | /* | 390 | /* |