123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- extern "C" {
- enum cfb_display_param {
- CFB_DISPLAY_HEIGH = 0,
- CFB_DISPLAY_WIDTH,
- CFB_DISPLAY_PPT,
- CFB_DISPLAY_ROWS,
- CFB_DISPLAY_COLS,
- };
- enum cfb_font_caps {
- CFB_FONT_MONO_VPACKED = BIT(0),
- CFB_FONT_MONO_HPACKED = BIT(1),
- CFB_FONT_MSB_FIRST = BIT(2),
- };
- struct cfb_font {
- const void *data;
- enum cfb_font_caps caps;
- uint8_t width;
- uint8_t height;
- uint8_t first_char;
- uint8_t last_char;
- };
- static const STRUCT_SECTION_ITERABLE(cfb_font, _name) = { \
- .data = _data, \
- .caps = _caps, \
- .width = _width, \
- .height = _height, \
- .first_char = _fc, \
- .last_char = _lc, \
- }
- int cfb_print(const struct device *dev, char *str, uint16_t x, uint16_t y);
- int cfb_framebuffer_clear(const struct device *dev, bool clear_display);
- int cfb_framebuffer_invert(const struct device *dev);
- int cfb_framebuffer_finalize(const struct device *dev);
- int cfb_get_display_parameter(const struct device *dev,
- enum cfb_display_param);
- int cfb_framebuffer_set_font(const struct device *dev, uint8_t idx);
- int cfb_get_font_size(const struct device *dev, uint8_t idx, uint8_t *width,
- uint8_t *height);
- int cfb_get_numof_fonts(const struct device *dev);
- int cfb_framebuffer_init(const struct device *dev);
- }
|