ESPNode
audiodisplay_ST7789.h
Go to the documentation of this file.
1 #ifndef _AUDIODISPLAY_ST7789_H_
2 #define _AUDIODISPLAY_ST7789_H_
3 
4 #include "Adafruit_GFX.h"
5 #include "Adafruit_ST7789.h"
6 #include "audiodisplay_bmps.h"
7 
8 #define ARC_SIGMENT_DEGREES 3
9 #define ARC_WIDTH 5
10 // define colors
11 #define COLOR_WHITE 0xFFFF
12 #define COLOR_RED 0xF800
13 #define COLOR_BLACK 0x0000
14 #define COLOR_YELLOW 0xFFE0
15 #define COLOR_ORANGE 0xFD20
16 #define COLOR_GREEN 0x07E0
17 #define COLOR_LIGHTGREY 0xC618
18 #define COLOR_BLUE 0x001F
19 
20 #define TEXT_UNDER_BMP_X 30
21 #define TEXT_UNDER_BMP_Y 140
22 #define BMP_LEFT 70
23 #define BMP_DOWN 50
24 
25 
26 class AudioDisplay : public Adafruit_ST7789{
27 public:
28  AudioDisplay(int8_t _cs, int8_t _dc, int8_t _mosi, int8_t _sck, int8_t _rst, int8_t _bl, uint16_t _x, uint16_t _y);
29  void clear();
30  void show_ip(const char* myip);
31  void show_bps(const char* mybps);
32  void show_vol(uint8_t vol);
33  void show_info1(const char* myinfo);
34  void show_info2(const char* myinfo);
35  void show_time(bool big);
36  void show_modus(const char* modusStr);
37  void show_jpg(String& jpgFile);
38  void select(const char* s0, const char* s1, const char* s2);
39  void select(const char* s0, const char* s1, const char* s2, const char* s3, const char* s4);
40  void select(const char* s0, uint16_t * pic);
41 
42 
43 private:
44  void fillArc(int x, int y, int start_angle, int degree, int rx, int ry, int w, unsigned int colour);
45  int splitStr(const char* inStr, int startPos, int maxLen, char* resultStr);
46  void show_text(const char* mytext, int posx, int posy, uint16_t color);
47  void show_text_s2(const char* mytext, int posx, int posy, uint16_t color);
48  uint16_t tft_x, tft_y, tft_bl;
49 };
50 
51 #endif
Definition: audiodisplay_ST7789.h:26
AudioDisplay(int8_t _cs, int8_t _dc, int8_t _mosi, int8_t _sck, int8_t _rst, int8_t _bl, uint16_t _x, uint16_t _y)
void select(const char *s0, const char *s1, const char *s2)
void select(const char *s0, uint16_t *pic)
void select(const char *s0, const char *s1, const char *s2, const char *s3, const char *s4)
void show_time(bool big)
void show_info1(const char *myinfo)
void show_ip(const char *myip)
void show_modus(const char *modusStr)
void show_vol(uint8_t vol)
void show_bps(const char *mybps)
void show_jpg(String &jpgFile)
void show_info2(const char *myinfo)