1
0
Fork 0
forked from len0rd/rockbox

Xduoo X3 add headphone and lineout status to IO Ports debug menu

Change-Id: I9caf55c1249625dff7e437158afd20a526fa7499
This commit is contained in:
William Wilgus 2020-09-17 11:07:29 -04:00
parent 3c2b6809d9
commit a66b908801

View file

@ -56,6 +56,9 @@ static int maxlines = 0;
#define ON "Enabled"
#define OFF "Disabled"
#define INSERTED "Inserted"
#define REMOVED "Removed"
#define OFF "Disabled"
#define STOPPED "Stopped"
#define RUNNING "Running"
@ -323,7 +326,6 @@ bool dbg_ports(void)
long fun, intr;
long lvl;
lcd_clear_display();
lcd_setfont(FONT_SYSFIXED);
@ -332,12 +334,16 @@ bool dbg_ports(void)
i = 0;
while(dbg_btn_update(&done, &x))
{
i %= last_port; /*PORT: A B C D E F */
i %= last_port; /*PORT: A B C D E F HEADPHONE/LINEOUT */
while(dbg_btn_update(&done, &x))
{
line = 0;
lcd_puts(x, line++, "[GPIO Vals and Dirs]");
for (j = i; j < i + 2; j++)
{
if (j < last_port)
{
cur = j % last_port;
dir = REG_GPIO_PXDIR(cur);
@ -351,6 +357,17 @@ bool dbg_ports(void)
lcd_putsf(x, line++, "DAT: %8x INT: %8x", data, intr);
line++;
}
else
{
lcd_puts(x, line++, "[Headphone Status]");
#if defined(HAVE_HEADPHONE_DETECTION)
lcd_putsf(x, line++, "HP: %s", headphones_inserted() ? INSERTED:REMOVED);
#endif
#if defined(HAVE_LINEOUT_DETECTION)
lcd_putsf(x, line++, "LO: %s", lineout_inserted() ? INSERTED:REMOVED);
#endif
}
}
}
i++;
}