summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c')
-rw-r--r--firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c
index 39469028a0..85ab6cd365 100644
--- a/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c
+++ b/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c
@@ -29,6 +29,9 @@
29#include "pinctrl-imx233.h" 29#include "pinctrl-imx233.h"
30#include "dcp-imx233.h" 30#include "dcp-imx233.h"
31#include "logf.h" 31#include "logf.h"
32#include "button.h"
33#include "font.h"
34#include "action.h"
32 35
33#ifdef HAVE_LCD_ENABLE 36#ifdef HAVE_LCD_ENABLE
34static bool lcd_on; 37static bool lcd_on;
@@ -762,3 +765,34 @@ void lcd_blit_yuv(unsigned char * const src[3],
762 lcd_update_rect(LCD_WIDTH - y - height, x, height, width); 765 lcd_update_rect(LCD_WIDTH - y - height, x, height, width);
763 #endif 766 #endif
764} 767}
768
769bool lcd_debug_screen(void)
770{
771 lcd_setfont(FONT_SYSFIXED);
772
773 while(1)
774 {
775 int button = get_action(CONTEXT_STD, HZ / 10);
776 switch(button)
777 {
778 case ACTION_STD_NEXT:
779 case ACTION_STD_PREV:
780 case ACTION_STD_OK:
781 case ACTION_STD_MENU:
782 lcd_setfont(FONT_UI);
783 return true;
784 case ACTION_STD_CANCEL:
785 lcd_setfont(FONT_UI);
786 return false;
787 }
788
789 lcd_clear_display();
790 lcd_putsf(0, 0, "lcd kind: %s",
791 lcd_kind == LCD_KIND_7783 ? "st7783" :
792 lcd_kind == LCD_KIND_9325 ? "ili9325" : "unknown");
793 lcd_update();
794 yield();
795 }
796
797 return true;
798}