diff options
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/button.c | 36 | ||||
-rw-r--r-- | firmware/drivers/lcd-player.c | 46 | ||||
-rw-r--r-- | firmware/drivers/serial.c | 2 |
3 files changed, 1 insertions, 83 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 | /* |
diff --git a/firmware/drivers/lcd-player.c b/firmware/drivers/lcd-player.c index fb870f232a..01d7cfdb6e 100644 --- a/firmware/drivers/lcd-player.c +++ b/firmware/drivers/lcd-player.c | |||
@@ -488,11 +488,7 @@ void lcd_set_contrast(int val) | |||
488 | 488 | ||
489 | void lcd_init (void) | 489 | void lcd_init (void) |
490 | { | 490 | { |
491 | #ifdef HAVE_NEO_LCD | ||
492 | new_lcd = true; | ||
493 | #else | ||
494 | new_lcd = has_new_lcd(); | 491 | new_lcd = has_new_lcd(); |
495 | #endif | ||
496 | memset(extended_chars_mapped, NO_CHAR, sizeof(extended_chars_mapped)); | 492 | memset(extended_chars_mapped, NO_CHAR, sizeof(extended_chars_mapped)); |
497 | memset(extended_pattern_content, NO_CHAR,sizeof(extended_pattern_content)); | 493 | memset(extended_pattern_content, NO_CHAR,sizeof(extended_pattern_content)); |
498 | memset(extended_pattern_usage, 0, sizeof(extended_pattern_usage)); | 494 | memset(extended_pattern_usage, 0, sizeof(extended_pattern_usage)); |
@@ -731,46 +727,4 @@ static void scroll_thread(void) | |||
731 | } | 727 | } |
732 | } | 728 | } |
733 | 729 | ||
734 | #ifdef HAVE_NEO_LCD | ||
735 | |||
736 | /* | ||
737 | * Function use by the Neo code, but could/should be made a generic one. | ||
738 | */ | ||
739 | void lcd_cursor(int x, int y) | ||
740 | { | ||
741 | /* If we make sure the display size is setup with proper defines in the | ||
742 | config-*.h files, this should work on all displays */ | ||
743 | if ((cursor.y_pos==y && cursor.x_pos==x) || | ||
744 | x>=20 || | ||
745 | y>3 || | ||
746 | x<0 || | ||
747 | y<0) { | ||
748 | DEBUGF("ignoring request for cursor to %d,%d - currently %d,%d\n", | ||
749 | x,y,cursor.x_pos,cursor.y_pos); | ||
750 | return; | ||
751 | } | ||
752 | |||
753 | char value=0; | ||
754 | |||
755 | cursor.y_pos=y; | ||
756 | cursor.x_pos=x; | ||
757 | |||
758 | switch (y) { | ||
759 | case 0: | ||
760 | value=0x80|x; | ||
761 | break; | ||
762 | case 1: | ||
763 | value=0x80|(x+0x40); | ||
764 | break; | ||
765 | case 2: | ||
766 | value=0x80|(x+0x14); | ||
767 | break; | ||
768 | case 3: | ||
769 | value=0x80|(x+0x54); | ||
770 | break; | ||
771 | } | ||
772 | lcd_write_command(value); | ||
773 | } | ||
774 | #endif | ||
775 | |||
776 | #endif /* HAVE_LCD_CHARCELLS */ | 730 | #endif /* HAVE_LCD_CHARCELLS */ |
diff --git a/firmware/drivers/serial.c b/firmware/drivers/serial.c index e1e0eb82e9..a66f3b1fa4 100644 --- a/firmware/drivers/serial.c +++ b/firmware/drivers/serial.c | |||
@@ -85,7 +85,7 @@ int remote_control_rx(void) | |||
85 | } | 85 | } |
86 | else | 86 | else |
87 | { | 87 | { |
88 | #if !defined(HAVE_NEO_KEYPAD) && !defined(HAVE_ONDIO_KEYPAD) | 88 | #ifndef HAVE_ONDIO_KEYPAD |
89 | switch (btn) | 89 | switch (btn) |
90 | { | 90 | { |
91 | case STOP: | 91 | case STOP: |