bdk: touch: refactor/improve

- Remove useless poll wait
- Use more defines
- Deduplicate code
- Add more checks
- Add switch sense mode
This commit is contained in:
CTCaer
2026-02-15 02:32:38 +02:00
parent 38e73d6492
commit 0a55598ab6
2 changed files with 55 additions and 66 deletions

View File

@@ -2,7 +2,7 @@
* Touch driver for Nintendo Switch's STM FingerTip S (4CD60D) touch controller
*
* Copyright (c) 2018 langerhans
* Copyright (c) 2018-2020 CTCaer
* Copyright (c) 2018-2026 CTCaer
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -163,12 +163,12 @@ typedef struct _touch_fw_info_t {
} touch_fw_info_t;
void touch_poll(touch_event *event);
touch_event touch_poll_wait();
touch_panel_info_t *touch_get_panel_vendor();
int touch_get_fw_info(touch_fw_info_t *fw);
touch_info touch_get_info();
int touch_panel_ito_test(u8 *err);
int touch_execute_autotune();
int touch_switch_sense_mode(u8 mode, bool gis_6_2);
int touch_sense_enable();
int touch_power_on();
void touch_power_off();