display.h 754 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef _DISPLAY_H_
  2. #define _DISPLAY_H_
  3. #include <stdlib.h>
  4. typedef enum {
  5. GCMD_CLEAR,
  6. GCMD_HSCROLL,
  7. GCMD_VSCROLL,
  8. GCMD_BITBLT,
  9. GCMD_DRAWBITMAP,
  10. GCMD_SETPIXEL,
  11. GCMD_DRAWLINE,
  12. GCMD_DRAWCIRCLE,
  13. GCMD_DRAWRECT,
  14. GCMD_PUTCHR,
  15. GCMD_PUTSTR,
  16. } gcmd;
  17. typedef struct {
  18. uint8_t x;
  19. uint8_t y;
  20. } coord;
  21. typedef struct {
  22. uint8_t left, right, top, bottom;
  23. } rect;
  24. typedef struct {
  25. uint8_t width, height;
  26. uint8_t data[1];
  27. } gbmp;
  28. typedef struct {
  29. gcmd c;
  30. void *params;
  31. } gparam;
  32. extern uint8_t display_buffer[];
  33. void display(void);
  34. void display_putchar(char c, uint8_t col_x, uint8_t col_y, bool reverse);
  35. void display_putstr(char *str, uint8_t col_x, uint8_t col_y, bool reverse);
  36. #endif