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