osd.h 839 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef GOTEK_OSD_H
  2. #define GOTEK_OSD_H
  3. /* FF OSD command set */
  4. #define OSD_BACKLIGHT 0x00 /* [0] = backlight on */
  5. #define OSD_DATA 0x02 /* next columns*rows bytes are text data */
  6. #define OSD_ROWS 0x10 /* [3:0] = #rows */
  7. #define OSD_HEIGHTS 0x20 /* [3:0] = 1 iff row is 2x height */
  8. #define OSD_BUTTONS 0x30 /* [3:0] = button mask */
  9. #define OSD_COLUMNS 0x40 /* [6:0] = #columns */
  10. struct osd_display_t {
  11. int rows, cols, on;
  12. uint8_t heights;
  13. uint8_t text[4][40];
  14. };
  15. #include <Arduino.h>
  16. namespace gotek {
  17. class osd {
  18. public:
  19. void begin();
  20. void start();
  21. private:
  22. };
  23. void OSD_RxHandler(int);
  24. void OSD_RxHandler2(int);
  25. void OSD_RxRequest(void);
  26. void OSD_RxRequest2(void);
  27. extern osd gotek_osd;
  28. }
  29. #endif // GOTEK_OSD_H