mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
fuze+: add lcd debug screen (display kind)
Change-Id: I08ffcfb8e4cf516aae1c23740eedf80d2cfcea41
This commit is contained in:
parent
09e6b890e6
commit
7fddc2327b
3 changed files with 38 additions and 1 deletions
|
|
@ -21,8 +21,9 @@
|
|||
|
||||
#include "system.h"
|
||||
#include "button-target.h"
|
||||
#include "lcd-target.h"
|
||||
|
||||
bool dbg_hw_target_info(void)
|
||||
{
|
||||
return button_debug_screen();
|
||||
return lcd_debug_screen() && button_debug_screen();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@
|
|||
#include "pinctrl-imx233.h"
|
||||
#include "dcp-imx233.h"
|
||||
#include "logf.h"
|
||||
#include "button.h"
|
||||
#include "font.h"
|
||||
#include "action.h"
|
||||
|
||||
#ifdef HAVE_LCD_ENABLE
|
||||
static bool lcd_on;
|
||||
|
|
@ -762,3 +765,34 @@ void lcd_blit_yuv(unsigned char * const src[3],
|
|||
lcd_update_rect(LCD_WIDTH - y - height, x, height, width);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool lcd_debug_screen(void)
|
||||
{
|
||||
lcd_setfont(FONT_SYSFIXED);
|
||||
|
||||
while(1)
|
||||
{
|
||||
int button = get_action(CONTEXT_STD, HZ / 10);
|
||||
switch(button)
|
||||
{
|
||||
case ACTION_STD_NEXT:
|
||||
case ACTION_STD_PREV:
|
||||
case ACTION_STD_OK:
|
||||
case ACTION_STD_MENU:
|
||||
lcd_setfont(FONT_UI);
|
||||
return true;
|
||||
case ACTION_STD_CANCEL:
|
||||
lcd_setfont(FONT_UI);
|
||||
return false;
|
||||
}
|
||||
|
||||
lcd_clear_display();
|
||||
lcd_putsf(0, 0, "lcd kind: %s",
|
||||
lcd_kind == LCD_KIND_7783 ? "st7783" :
|
||||
lcd_kind == LCD_KIND_9325 ? "ili9325" : "unknown");
|
||||
lcd_update();
|
||||
yield();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,4 +21,6 @@
|
|||
#ifndef LCD_TARGET_H
|
||||
#define LCD_TARGET_H
|
||||
|
||||
bool lcd_debug_screen(void);
|
||||
|
||||
#endif /* LCD_TARGET_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue