display.h 588 B

1234567891011121314151617181920212223242526272829
  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. uint8_t x1,y1;
  15. uint8_t x2,y2;
  16. uint8_t data[OLED_WIDTH/FONT_WIDTH + 1];
  17. } display_cmd_t;
  18. #define DISPLAY_CMD_NONE 0x0000
  19. #define DISPLAY_CMD_CLEAR 0x0001
  20. #define DISPLAY_CMD_PUTSTR 0x0002
  21. #endif