debug: show touchscreen info in the hw debug screen on hibylinux targets

Also add this debug screen to the hiby r1 / r3proii targets.

Change-Id: Ia255571838baef9900f6b6a3c395c10b872f5f5a
This commit is contained in:
Solomon Peachy 2026-01-17 21:23:19 -05:00
parent a9e4c80878
commit b9ce049876
6 changed files with 22 additions and 2 deletions

View file

@ -2846,7 +2846,7 @@ static const struct {
{ "Screendump", dbg_screendump },
#endif
{ "Skin Engine RAM usage", dbg_skin_engine },
#if ((CONFIG_PLATFORM & PLATFORM_NATIVE) || defined(SONY_NWZ_LINUX) || (defined(HIBY_LINUX) && !defined(HIBY_R3PROII) && !defined(HIBY_R1)) || defined(FIIO_M3K_LINUX)) && !defined(SIMULATOR)
#if ((CONFIG_PLATFORM & PLATFORM_NATIVE) || defined(SONY_NWZ_LINUX) || defined(HIBY_LINUX) || defined(FIIO_M3K_LINUX)) && !defined(SIMULATOR)
{ "View HW info", dbg_hw_info },
#endif
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)

View file

@ -163,6 +163,7 @@ target/hosted/power-linux.c
target/hosted/hiby/usb-hiby-gadget.c
target/hosted/hiby/r3proii/button-r3proii.c
target/hosted/hiby/r3proii/powermgmt-r3proii.c
target/hosted/hiby/debug-hiby.c
#ifndef BOOTLOADER
target/hosted/hiby/r3proii/led-r3proii.c
target/hosted/hiby/hibylinux_codec.c
@ -173,6 +174,7 @@ target/hosted/hiby/hibylinux_codec.c
target/hosted/hiby/usb-hiby-gadget.c
target/hosted/hiby/r1/button-r1.c
target/hosted/hiby/r1/powermgmt-r1.c
target/hosted/hiby/debug-hiby.c
#ifndef BOOTLOADER
target/hosted/hiby/r1/led-r1.c
target/hosted/hiby/hibylinux_codec.c

View file

@ -72,4 +72,6 @@ void touchscreen_enable_device(bool en);
bool touchscreen_is_enabled(void);
#endif
void touchscreen_last_state(int *x, int *y, int *state);
#endif /* __TOUCHSCREEN_INCLUDE_H_ */

View file

@ -88,6 +88,14 @@ bool dbg_hw_info(void)
#endif
lcd_putsf(0, line++, "btn: 0x%x", btn);
#ifdef HAVE_TOUCHSCREEN
int x;
int y;
int state;
touchscreen_last_state(&x, &y, &state);
lcd_putsf(0, line++, "touch: x %d y %d st %d", x, y, state);
#endif
lcd_update();
sleep(HZ/16);
}

View file

@ -107,10 +107,17 @@ static enum
// XXX ... figure out what is standard.
#define EVENT_VALUE_TOUCHSCREEN_PRESS 1
#define EVENT_VALUE_TOUCHSCREEN_RELEASE -1
#define EVENT_VALUE_TOUCHSCREEN_RELEASE 0
static int ts_enabled = 1;
void touchscreen_last_state(int *x, int *y, int *state)
{
*x = _last_x;
*y = _last_y;
*state = _last_touch_state;
}
void touchscreen_enable_device(bool en)
{
ts_enabled = en;

View file

@ -0,0 +1 @@
#include "../agptek/debug-agptek.c"