41 lines
1.1 KiB
C
41 lines
1.1 KiB
C
#pragma once
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* RGB565 图片描述符,实际像素由渲染任务根据逻辑名称查找和解码。 */
|
|
typedef struct {
|
|
const char *path;
|
|
} lcd_direct_image_t;
|
|
|
|
/* 图标描述符与普通帧分离,便于在主画面之上进行状态叠加。 */
|
|
typedef struct {
|
|
const char *path;
|
|
} lcd_direct_icon_t;
|
|
|
|
/* 默认图标序列携带绘制坐标,返回的数组由静态资源表持有。 */
|
|
typedef struct {
|
|
uint16_t icon_id;
|
|
uint16_t x;
|
|
uint16_t y;
|
|
} lcd_direct_icon_draw_t;
|
|
|
|
#define LCD_DIRECT_NO_ICON 0xFFFFU
|
|
#define LCD_DIRECT_DEFAULT_ICON_COUNT 5U
|
|
#define LCD_DIRECT_ICON_CHARGING 5U
|
|
#define LCD_DIRECT_ICON_LOW_BATTERY 6U
|
|
|
|
/* 查找函数返回只读静态描述符;目录、序号或图标不存在时返回 NULL。 */
|
|
const lcd_direct_image_t *lcd_direct_default_image(void);
|
|
const lcd_direct_image_t *lcd_direct_asset_frame(const char *asset_dir, uint8_t frame_index);
|
|
const lcd_direct_icon_t *lcd_direct_icon(uint16_t icon_id);
|
|
const lcd_direct_icon_draw_t *lcd_direct_default_icon_sequence(size_t *out_count);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|