Tue, 27 Oct 2020 21:48:28 +0100
hp34comm: add support for boot keycode
37
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
1 | #ifndef DISPLAY_H |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
2 | #define DISPLAY_H |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
3 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
4 | #include "Terminal6x8.h" |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
5 | #include "Mono19x27.h" |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
6 | #include "Mono15x22.h" |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
7 | #include "Arial12x12.h" |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
8 | #include "SSD1322.h" |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
9 | #include "hp34comm.h" |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
10 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
11 | typedef struct _DSP |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
12 | { |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
13 | uint8_t cmd; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
14 | uint8_t color; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
15 | uint8_t bgcolor; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
16 | uint8_t x0; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
17 | uint8_t y0; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
18 | uint8_t fmt; // 0x01=>ascii, 0x02=>hex, 0x04=>bits, 0x08=>flags, 0x80=>ignore |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
19 | uint8_t maxsize; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
20 | uint8_t width; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
21 | const unsigned char* font; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
22 | char buffer[MAX_BUFF+1]; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
23 | } DSP; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
24 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
25 | static DSP table[] = |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
26 | { |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
27 | { 0x00, 0xF, 0x0, 0, 0, 0x01, MAX_BUFF, 245, Mono19x27}, // main display |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
28 | { 0x0C, 0xF, 0x0,196, 34, 0x01, 3, 45, Mono15x22}, // channels display |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
29 | { 0x0A, 0xF, 0x0, 0, 57, 0x08, 4, 0, Terminal6x8}, // flags + bits |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
30 | }; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
31 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
32 | // 9x10 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
33 | const unsigned char icon_alarm[] __attribute__((aligned (2))) = |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
34 | { |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
35 | 0x1c, 0x0, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
36 | 0x3e, 0x0, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
37 | 0x7f, 0x0, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
38 | 0x7f, 0x0, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
39 | 0x7f, 0x0, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
40 | 0x7f, 0x0, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
41 | 0x7f, 0x0, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
42 | 0x7f, 0x0, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
43 | 0xff, 0x80, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
44 | 0x10, 0x0 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
45 | }; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
46 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
47 | const unsigned char icon_curve[] __attribute__((aligned (2))) = |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
48 | { |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
49 | 0x80, 0x0, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
50 | 0x80, 0x0, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
51 | 0x80, 0x80, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
52 | 0x81, 0x0, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
53 | 0x9e, 0x0, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
54 | 0xa0, 0x0, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
55 | 0xc0, 0x0, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
56 | 0x80, 0x0, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
57 | 0x80, 0x0, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
58 | 0xff, 0x80 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
59 | }; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
60 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
61 | typedef struct _FLAG |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
62 | { |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
63 | uint8_t flag; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
64 | uint8_t x; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
65 | uint8_t y; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
66 | bool reverse; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
67 | const char* msg; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
68 | const unsigned char* icon; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
69 | } FLAG; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
70 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
71 | typedef struct _FRAME |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
72 | { |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
73 | uint16_t flag; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
74 | uint8_t x0; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
75 | uint8_t y0; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
76 | uint8_t x1; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
77 | uint8_t y1; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
78 | } FRAME; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
79 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
80 | static const FLAG flags[] = |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
81 | { |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
82 | // flag, zone, x0, y0, reverse, msg, icon |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
83 | // right-side icons area |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
84 | { 0x00, 246, 0, false, NULL, icon_alarm}, // F1.0 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
85 | { 0x01, 246, 11, false, NULL, icon_curve}, // F1.1 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
86 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
87 | // F1.2 == Channel frame |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
88 | { 0x03, 197, 27, false, "Channel"}, // F1.3 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
89 | // F1.7 == Alarm frame |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
90 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
91 | { 0x34, 0, 28+8, false, "MON"}, // F4.4 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
92 | { 0x33, 0, 28+16, false, "VIEW"}, // F4.3 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
93 | { 0x35, 0, 28, true, "SCAN"}, // F4.5 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
94 | { 0x36, 0, 28+25, true, "CONFIG"}, // F4.6 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
95 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
96 | { 0x32, 40, 52, false, "*"}, // F4.2 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
97 | { 0x31, 50, 52, false, "ADRS"}, // F4.1 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
98 | { 0x30, 80, 52, false, "RMT"}, // F4.0 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
99 | { 0x27, 104, 52, true, "ERROR"}, // F3.7 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
100 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
101 | { 0x26, 140, 52, false, "EXT"}, // F3.6 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
102 | { 0x25, 164, 52, false, "ONCE"}, // F3.5 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
103 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
104 | { 0x23, 104, 28+16, false, "MEM"}, // F3.3 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
105 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
106 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
107 | // col 5 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
108 | { 0x14, 244, 22, false, "4W"}, // F2.4 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
109 | { 0x15, 244, 30, false, "OC"}, // F2.5 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
110 | { 0x22, 129, 28+16, false, "LAST"}, // F3.2 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
111 | { 0x21, 129, 28+16, false, "MIN"}, // F3.1 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
112 | { 0x20, 129, 28+16, false, "MAX"}, // F3.0 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
113 | { 0x17, 129, 28+16, false, "AVG"}, // F2.7 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
114 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
115 | { 0x05, 154+0, 17+10, false, "Alarm"}, // F1.5 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
116 | { 0x06, 154+0, 17+20, false, "H"}, // F1.6 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
117 | { 0x13, 154+6, 17+20, false, "1"}, // F2.3 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
118 | { 0x10, 154+12, 17+20, false, "2"}, // F2.0 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
119 | { 0x12, 154+18, 17+20, false, "3"}, // F2.2 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
120 | { 0x11, 154+24, 17+20, false, "4"}, // F2.1 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
121 | { 0x04, 154+30, 17+20, false, "L"}, // F1.4 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
122 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
123 | }; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
124 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
125 | static const FRAME zones[] = |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
126 | { // flag, x0, y0, x1, y1 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
127 | { 0x001, 0, 0, 245, 27}, // main display area |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
128 | { 0x002, 246, 0, 255, 27}, // right notif area |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
129 | { 0x004, 208, 35, 254, 62}, // channels display area |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
130 | { 0x008, 160, 28, 202, 54}, // alarms area |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
131 | { 0x010, 0, 28, 32, 54}, // flags col1 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
132 | { 0x020, 33, 28, 70, 54}, // flags col2 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
133 | { 0x040, 71, 28, 103, 54}, // flags col3 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
134 | { 0x080, 104, 28, 128, 54}, // flags col4 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
135 | { 0x100, 129, 28, 159, 54}, // flags col5 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
136 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
137 | // { 0x8000, 0, 55, 255, 63}, // flags bits display area |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
138 | }; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
139 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
140 | static const FRAME frames[] = |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
141 | { |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
142 | { 0x02, 194, 30, 243, 53}, // F1.2 - channel frame |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
143 | { 0x07, 151, 30, 192, 46}, // F1.7 - alarm frame |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
144 | }; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
145 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
146 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
147 | class Display: public SSD1322 |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
148 | { |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
149 | public: |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
150 | Display(int Hz, PinName mosi, PinName miso, PinName sclk, PinName CS, PinName reset, PinName DC, |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
151 | const char* name); |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
152 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
153 | virtual ~Display(); |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
154 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
155 | void test_dsp(); |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
156 | void show(uint8_t, const char*, uint8_t); |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
157 | void show_splashscreen(); |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
158 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
159 | private: |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
160 | uint8_t must_refresh; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
161 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
162 | }; |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
163 | |
07e8ca2bdf6d
Extracted the display related functions in a Display class
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
164 | #endif |