diff options
| author | Your Name <you@example.com> | 2026-05-20 02:14:45 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-20 02:14:45 +0530 |
| commit | 899016795c389151e6b486ec470653f5688e5c5f (patch) | |
| tree | 64b4c732d6f585552fd14df5f47890764c66ac1a /main/touch.h | |
| parent | 4f713120dbedd37a3512c2ec1af0766025a59d57 (diff) | |
feat: merge display-fix — touch driver, keyboard, WiFi setup UI
Squash-merge of feature/display-fix (27 commits):
- AXS15231B touch driver with coordinate parsing (touch.c/h)
- On-screen keyboard with layout/hit detection (keyboard.c/h)
- WiFi setup state machine + config_add_wifi (wifi_setup.c/h)
- Web-based WiFi setup via captive portal
- Display rotation fix (stride=480), color fixes, DMA byte-swap
- WiFi QR code on BOOT and ERROR screens
- ERROR state transition after WiFi retries exhausted
- Unit tests: test_touch, test_keyboard, test_wifi_setup
- Integration test: wifi_setup.mjs
- E2E test: wifi-setup.spec.mjs
- Per-board hardware locks for flash targets
Conflicts resolved: took master for config/cvm/api/main (more current),
took display-fix for display/axs15231b (newer fixes).
Diffstat (limited to 'main/touch.h')
| -rw-r--r-- | main/touch.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/main/touch.h b/main/touch.h new file mode 100644 index 0000000..b9e3ccd --- /dev/null +++ b/main/touch.h | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | #ifndef TOUCH_H | ||
| 2 | #define TOUCH_H | ||
| 3 | |||
| 4 | #include "esp_err.h" | ||
| 5 | #include <stdint.h> | ||
| 6 | #include <stdbool.h> | ||
| 7 | |||
| 8 | #define TOUCH_SDA_PIN 4 | ||
| 9 | #define TOUCH_SCL_PIN 8 | ||
| 10 | #define TOUCH_RST_PIN 12 | ||
| 11 | #define TOUCH_INT_PIN 11 | ||
| 12 | #define TOUCH_I2C_ADDR 0x3B | ||
| 13 | #define TOUCH_MAX_X 319 | ||
| 14 | #define TOUCH_MAX_Y 479 | ||
| 15 | |||
| 16 | typedef struct { | ||
| 17 | uint16_t x; | ||
| 18 | uint16_t y; | ||
| 19 | bool touched; | ||
| 20 | } touch_point_t; | ||
| 21 | |||
| 22 | esp_err_t touch_init(void); | ||
| 23 | bool touch_read(touch_point_t *pt); | ||
| 24 | void touch_deinit(void); | ||
| 25 | void touch_set_rotation(int rotation); | ||
| 26 | |||
| 27 | void touch_parse_raw(const uint8_t *data, touch_point_t *pt); | ||
| 28 | |||
| 29 | #endif | ||