123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- #ifndef ZEPHYR_DRIVERS_DISPLAY_ENGINE_DE_COMMON_H_
- #define ZEPHYR_DRIVERS_DISPLAY_ENGINE_DE_COMMON_H_
- #include <kernel.h>
- #include <sys/slist.h>
- #include <drivers/display/display_engine.h>
- #include <linker/linker-defs.h>
- enum de_command_id {
-
- DE_CMD_COMPOSE = 0,
- DE_CMD_COMPOSE_WB,
- DE_CMD_FILL,
- DE_CMD_BLIT,
- DE_CMD_BLEND,
- DE_CMD_BLEND_FG,
- DE_CMD_SET_CLUT,
-
- DE_CMD_ROTATE_FILL,
- DE_CMD_ROTATE_RECT,
- DE_CMD_ROTATE_CIRCLE,
- };
- struct de_command_entry {
- uint8_t inst;
- uint8_t cmd;
- uint16_t seq;
- #if defined(CONFIG_DISPLAY_ENGINE_LARK)
- uint32_t cfg[30];
- #elif defined(CONFIG_DISPLAY_ENGINE_LEOPARD)
- uint32_t cfg[38];
- #endif
- sys_snode_t node;
- };
- int de_alloc_instance(uint32_t flags);
- int de_free_instance(int inst);
- bool de_instance_has_flag(int inst, uint32_t flag);
- struct de_command_entry *de_instance_alloc_entry(int inst);
- int de_instance_free_entry(struct de_command_entry *entry);
- int de_instance_poll(int inst, int timeout);
- int de_instance_register_callback(int inst, display_engine_instance_callback_t callback, void *user_data);
- int de_instance_notify(struct de_command_entry *entry, int status);
- void de_command_pools_init(void);
- #endif
|