display.h 662 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _DISPLAY_H_
  2. #define _DISPLAY_H_
  3. #include <stdlib.h>
  4. #include "pico/stdlib.h"
  5. #include "sd1306.h"
  6. #include "font8x8.h"
  7. // extern uint8_t display_buffer[];
  8. void display_init(void);
  9. void display_main(void);
  10. bool display_clear(void);
  11. bool display_putstr(char *str, uint8_t col_x, uint8_t col_y, bool reverse);
  12. typedef struct {
  13. uint16_t command;
  14. void *data;
  15. } display_cmd_t;
  16. typedef struct {
  17. uint8_t col;
  18. uint8_t row;
  19. bool reverse;
  20. char str[OLED_WIDTH/FONT_WIDTH + 1];
  21. } putstr_t;
  22. #define DISPLAY_CMD_NONE 0x0000
  23. #define DISPLAY_CMD_CLEAR 0x0001
  24. #define DISPLAY_CMD_PUTSTR 0x0002
  25. #endif