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 /tests/unit/stubs/driver/gpio.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 'tests/unit/stubs/driver/gpio.h')
| -rw-r--r-- | tests/unit/stubs/driver/gpio.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/unit/stubs/driver/gpio.h b/tests/unit/stubs/driver/gpio.h new file mode 100644 index 0000000..d8dda0a --- /dev/null +++ b/tests/unit/stubs/driver/gpio.h | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | #ifndef STUBS_DRIVER_GPIO_H | ||
| 2 | #define STUBS_DRIVER_GPIO_H | ||
| 3 | |||
| 4 | #include <stdint.h> | ||
| 5 | |||
| 6 | typedef enum { | ||
| 7 | GPIO_MODE_DISABLE = 0, | ||
| 8 | GPIO_MODE_INPUT, | ||
| 9 | GPIO_MODE_OUTPUT, | ||
| 10 | GPIO_MODE_OUTPUT_OD, | ||
| 11 | GPIO_MODE_INPUT_OUTPUT_OD, | ||
| 12 | GPIO_MODE_INPUT_OUTPUT, | ||
| 13 | } gpio_mode_t; | ||
| 14 | |||
| 15 | typedef enum { | ||
| 16 | GPIO_INTR_DISABLE = 0, | ||
| 17 | } gpio_int_type_t; | ||
| 18 | |||
| 19 | typedef enum { | ||
| 20 | GPIO_PULLUP_DISABLE = 0, | ||
| 21 | GPIO_PULLUP_ENABLE, | ||
| 22 | } gpio_pullup_t; | ||
| 23 | |||
| 24 | typedef enum { | ||
| 25 | GPIO_PULLDOWN_DISABLE = 0, | ||
| 26 | GPIO_PULLDOWN_ENABLE, | ||
| 27 | } gpio_pulldown_t; | ||
| 28 | |||
| 29 | typedef struct { | ||
| 30 | uint64_t pin_bit_mask; | ||
| 31 | gpio_mode_t mode; | ||
| 32 | gpio_pullup_t pull_up_en; | ||
| 33 | gpio_pulldown_t pull_down_en; | ||
| 34 | gpio_int_type_t intr_type; | ||
| 35 | } gpio_config_t; | ||
| 36 | |||
| 37 | static inline int gpio_config(const gpio_config_t *cfg) { (void)cfg; return 0; } | ||
| 38 | static inline int gpio_set_level(uint32_t gpio_num, uint32_t level) { (void)gpio_num; (void)level; return 0; } | ||
| 39 | |||
| 40 | #define GPIO_INTR_DISABLE 0 | ||
| 41 | #define GPIO_PULLUP_DISABLE 0 | ||
| 42 | #define GPIO_PULLDOWN_DISABLE 0 | ||
| 43 | |||
| 44 | #endif | ||