Add main application logic and touch handling functionality
- Implemented main application entry point in main.cpp, initializing queues and event groups. - Created TouchHandler and EInkTouchHandler classes for handling touch events. - Added a minimal event loop for touch processing in touch.cpp. - Introduced unit tests for the hello world application in pytest_hello_world.py. - Added configuration files for CI and Wokwi support. - Created empty header files for network and UI modules.
This commit is contained in:
30
main/common/queue_defs.h
Normal file
30
main/common/queue_defs.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#include <indev/lv_indev.h>
|
||||
|
||||
typedef enum {
|
||||
CMD_DISPLAY_UPDATE,
|
||||
CMD_SAVE_DATA,
|
||||
CMD_LOAD_DATA,
|
||||
CMD_REFRESH_DISPLAY,
|
||||
CMD_SYSTEM_STATUS,
|
||||
} cmd_type_t;
|
||||
|
||||
typedef struct {
|
||||
cmd_type_t type;
|
||||
uint32_t id;
|
||||
void* data;
|
||||
size_t len;
|
||||
QueueHandle_t reply_to; // NULL if one-way
|
||||
} async_cmd_t;
|
||||
|
||||
extern QueueHandle_t command_queue;
|
||||
|
||||
typedef struct {
|
||||
uint16_t x, y;
|
||||
lv_indev_state_t state; // LV_INDEV_STATE_PR/REL
|
||||
uint32_t timestamp;
|
||||
uint8_t gesture; // TAP, SWIPE, LONG_PRESS
|
||||
} touch_event_t;
|
||||
|
||||
extern QueueHandle_t touch_queue;
|
||||
|
||||
extern EventGroupHandle_t system_event_group;
|
||||
Reference in New Issue
Block a user