// e_control.h #ifndef E_CONTROL_H #define E_CONTROL_H #include "lvgl.h" #include "e_common.h" #include "e_port_disp.h" #include "e_player_list.h" #include "e_dog.h" #include "e_image_carousel.h" #ifdef __cplusplus extern "C" { #endif typedef struct { disp_handle_t handle; // 显示器句柄 lv_obj_t *display_obj; // LVGL 显示对象 char *last_task_id; // 最后任务ID char device_id[14]; // 设备ID bool active; // 是否激活 VideoPlayer *video_player; // 视频播放器 ImageCarousel* carousel; // 价格图轮播器 } DisplayContext; /** * @brief 初始化通信 * * @param base_url 服务器基础URL */ void start(const char *base_url); /** * @brief 停止通信 * */ void stop(void); /** * @brief 刷新指定显示器节目列表 * * @param device_id 设备ID * @param task_id 节目单ID */ void refresh(const char *device_id); #ifdef __cplusplus } #endif #endif /* E_CONTROL_H */