Compare commits

...

3 commits

Author SHA1 Message Date
Solomon Peachy
b9ce049876 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
2026-01-17 22:48:29 -05:00
Solomon Peachy
a9e4c80878 hibylinux: Button code should be displayed in hex.
Change-Id: I3581098f632ba8fe0146b677f575ec6159c7c2db
2026-01-17 20:10:51 -05:00
Solomon Peachy
3a4da9381e surfansf28: Correct touchscreen operation
Based on what's committed I don't see how it could have ever worked.

Change-Id: I3c28e2c8791e75c494474183d1347426de9804fc
2026-01-17 19:58:21 -05:00
8 changed files with 25 additions and 5 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

@ -30,7 +30,7 @@
#define CONFIG_KEYPAD SURFANS_F28_PAD
/* define this if the target has volume keys which can be used in the lists */
#define HAVE_VOLUME_IN_LIST
//#define HAVE_VOLUME_IN_LIST
#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE

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

@ -86,7 +86,15 @@ bool dbg_hw_info(void)
#else
btn = button_read_device();
#endif
lcd_putsf(0, line++, "btn: %d", btn);
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"

View file

@ -47,7 +47,7 @@ int button_map(int keycode)
return BUTTON_PREV;
case KEY_POWER:
return BUTTON_POWER;
case KEY_KPMINUS:
case BTN_TOUCH:
return BUTTON_TOUCH;
default:
return 0;