Add human IR (PIR) module test on GPIO22 with SoftSPI touch and LVGL.

Motion-start count, hold bar, auto polarity, and flashable firmware/cyd package.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-23 14:46:56 +08:00
commit bab93d0e36
23 changed files with 1982 additions and 0 deletions

12
include/touch.h Normal file
View File

@@ -0,0 +1,12 @@
#pragma once
#include <lvgl.h>
#include <stdint.h>
void touch_init();
void touch_read_cb(lv_indev_t *indev, lv_indev_data_t *data);
// 调试:最近一次触点(物理 / LVGL 旋转后逻辑)
extern int16_t g_dbg_phys_x, g_dbg_phys_y;
extern int16_t g_dbg_logic_x, g_dbg_logic_y;
extern bool g_dbg_touch_down;