1 /**************************************************************************//**
\r
3 * @brief Segment LCD Config
\r
5 ******************************************************************************
\r
7 * <b>(C) Copyright 2014 Silicon Labs, http://www.silabs.com</b>
\r
8 *******************************************************************************
\r
10 * This file is licensed under the Silabs License Agreement. See the file
\r
11 * "Silabs_License_Agreement.txt" for details. Before using this software for
\r
12 * any purpose, you must agree to the terms of that agreement.
\r
14 ******************************************************************************/
\r
16 #ifndef __SEGMENTLCDCONFIG_H
\r
17 #define __SEGMENTLCDCONFIG_H
\r
25 /** Range of symbols available on display */
\r
46 #define LCD_SYMBOL_GECKO_COM 1
\r
47 #define LCD_SYMBOL_GECKO_SEG 12
\r
48 #define LCD_SYMBOL_ANT_COM 0
\r
49 #define LCD_SYMBOL_ANT_SEG 32
\r
50 #define LCD_SYMBOL_PAD0_COM 3
\r
51 #define LCD_SYMBOL_PAD0_SEG 39
\r
52 #define LCD_SYMBOL_PAD1_COM 2
\r
53 #define LCD_SYMBOL_PAD1_SEG 12
\r
54 #define LCD_SYMBOL_EFM32_COM 0
\r
55 #define LCD_SYMBOL_EFM32_SEG 28
\r
56 #define LCD_SYMBOL_MINUS_COM 3
\r
57 #define LCD_SYMBOL_MINUS_SEG 12
\r
58 #define LCD_SYMBOL_COL3_COM 4
\r
59 #define LCD_SYMBOL_COL3_SEG 12
\r
60 #define LCD_SYMBOL_COL5_COM 0
\r
61 #define LCD_SYMBOL_COL5_SEG 30
\r
62 #define LCD_SYMBOL_COL10_COM 5
\r
63 #define LCD_SYMBOL_COL10_SEG 39
\r
64 #define LCD_SYMBOL_DEGC_COM 0
\r
65 #define LCD_SYMBOL_DEGC_SEG 34
\r
66 #define LCD_SYMBOL_DEGF_COM 0
\r
67 #define LCD_SYMBOL_DEGF_SEG 35
\r
68 #define LCD_SYMBOL_DP2_COM 7
\r
69 #define LCD_SYMBOL_DP2_SEG 12
\r
70 #define LCD_SYMBOL_DP3_COM 5
\r
71 #define LCD_SYMBOL_DP3_SEG 12
\r
72 #define LCD_SYMBOL_DP4_COM 6
\r
73 #define LCD_SYMBOL_DP4_SEG 12
\r
74 #define LCD_SYMBOL_DP5_COM 7
\r
75 #define LCD_SYMBOL_DP5_SEG 29
\r
76 #define LCD_SYMBOL_DP6_COM 7
\r
77 #define LCD_SYMBOL_DP6_SEG 31
\r
78 #define LCD_SYMBOL_DP10_COM 4
\r
79 #define LCD_SYMBOL_DP10_SEG 39
\r
81 /* LCD Controller Prescaler (divide LFACLK / 64) */
\r
82 /* LFACLK_LCDpre = 512 Hz */
\r
83 /* Set FDIV=0, means 512/1 = 512 Hz */
\r
84 /* With octaplex mode, 512/16 => 32 Hz Frame Rate */
\r
85 #define LCD_CMU_CLK_PRE cmuClkDiv_64
\r
86 #define LCD_CMU_CLK_DIV cmuClkDiv_1
\r
88 #define LCD_BOOST_LEVEL lcdVBoostLevel3
\r
91 #define LCD_INIT_DEF \
\r
99 #define LCD_NUMBER_OFF() \
\r
101 LCD_SegmentSetHigh(1, 0x00000078, 0x00000000); \
\r
102 LCD_SegmentSetHigh(2, 0x00000078, 0x00000000); \
\r
103 LCD_SegmentSetHigh(3, 0x00000078, 0x00000000); \
\r
104 LCD_SegmentSetHigh(4, 0x00000078, 0x00000000); \
\r
105 LCD_SegmentSetHigh(5, 0x00000078, 0x00000000); \
\r
106 LCD_SegmentSetHigh(6, 0x00000078, 0x00000000); \
\r
107 LCD_SegmentSetHigh(7, 0x00000078, 0x00000000); \
\r
110 #define LCD_ALPHA_NUMBER_OFF() \
\r
112 LCD_SegmentSetLow(7, 0x500FE000, 0x00000000);\
\r
113 LCD_SegmentSetLow(6, 0xF00FE000, 0x00000000);\
\r
114 LCD_SegmentSetLow(5, 0xF00FE000, 0x00000000);\
\r
115 LCD_SegmentSetLow(4, 0xF00FE000, 0x00000000);\
\r
116 LCD_SegmentSetLow(3, 0xF00FE000, 0x00000000);\
\r
117 LCD_SegmentSetLow(2, 0xF00FE000, 0x00000000);\
\r
118 LCD_SegmentSetLow(1, 0xF00FE000, 0x00000000);\
\r
119 LCD_SegmentSetLow(0, 0xA0000000, 0x00000000);\
\r
120 LCD_SegmentSetHigh(7, 0x00000007, 0x00000000);\
\r
121 LCD_SegmentSetHigh(6, 0x00000007, 0x00000000);\
\r
122 LCD_SegmentSetHigh(5, 0x00000007, 0x00000000);\
\r
123 LCD_SegmentSetHigh(4, 0x00000007, 0x00000000);\
\r
124 LCD_SegmentSetHigh(3, 0x00000007, 0x00000000);\
\r
125 LCD_SegmentSetHigh(2, 0x00000007, 0x00000000);\
\r
126 LCD_SegmentSetHigh(1, 0x00000007, 0x00000000);\
\r
129 #define LCD_ALL_SEGMENTS_OFF() \
\r
131 LCD_SegmentSetLow(0, 0xF00FF000, 0x00000000);\
\r
132 LCD_SegmentSetLow(1, 0xF00FF000, 0x00000000);\
\r
133 LCD_SegmentSetLow(2, 0xF00FF000, 0x00000000);\
\r
134 LCD_SegmentSetLow(3, 0xF00FF000, 0x00000000);\
\r
135 LCD_SegmentSetLow(4, 0xF00FF000, 0x00000000);\
\r
136 LCD_SegmentSetLow(5, 0xF00FF000, 0x00000000);\
\r
137 LCD_SegmentSetLow(6, 0xF00FF000, 0x00000000);\
\r
138 LCD_SegmentSetLow(7, 0xF00FF000, 0x00000000);\
\r
139 LCD_SegmentSetHigh(0, 0x000000FF, 0x00000000);\
\r
140 LCD_SegmentSetHigh(1, 0x000000FF, 0x00000000);\
\r
141 LCD_SegmentSetHigh(2, 0x000000FF, 0x00000000);\
\r
142 LCD_SegmentSetHigh(3, 0x000000FF, 0x00000000);\
\r
143 LCD_SegmentSetHigh(4, 0x000000FF, 0x00000000);\
\r
144 LCD_SegmentSetHigh(5, 0x000000FF, 0x00000000);\
\r
145 LCD_SegmentSetHigh(6, 0x000000FF, 0x00000000);\
\r
146 LCD_SegmentSetHigh(7, 0x000000FF, 0x00000000);\
\r
149 #define LCD_ALL_SEGMENTS_ON() \
\r
151 LCD_SegmentSetLow(0, 0xF00FF000, 0xFFFFFFFF);\
\r
152 LCD_SegmentSetLow(1, 0xF00FF000, 0xFFFFFFFF);\
\r
153 LCD_SegmentSetLow(2, 0xF00FF000, 0xFFFFFFFF);\
\r
154 LCD_SegmentSetLow(3, 0xF00FF000, 0xFFFFFFFF);\
\r
155 LCD_SegmentSetLow(4, 0xF00FF000, 0xFFFFFFFF);\
\r
156 LCD_SegmentSetLow(5, 0xF00FF000, 0xFFFFFFFF);\
\r
157 LCD_SegmentSetLow(6, 0xF00FF000, 0xFFFFFFFF);\
\r
158 LCD_SegmentSetLow(7, 0xF00FF000, 0xFFFFFFFF);\
\r
159 LCD_SegmentSetHigh(0, 0x000000FF, 0xFFFFFFFF);\
\r
160 LCD_SegmentSetHigh(1, 0x000000FF, 0xFFFFFFFF);\
\r
161 LCD_SegmentSetHigh(2, 0x000000FF, 0xFFFFFFFF);\
\r
162 LCD_SegmentSetHigh(3, 0x000000FF, 0xFFFFFFFF);\
\r
163 LCD_SegmentSetHigh(4, 0x000000FF, 0xFFFFFFFF);\
\r
164 LCD_SegmentSetHigh(5, 0x000000FF, 0xFFFFFFFF);\
\r
165 LCD_SegmentSetHigh(6, 0x000000FF, 0xFFFFFFFF);\
\r
166 LCD_SegmentSetHigh(7, 0x000000FF, 0xFFFFFFFF);\
\r
169 #define LCD_SEGMENTS_ENABLE() \
\r
171 LCD_SegmentRangeEnable(lcdSegment12_15, true);\
\r
172 LCD_SegmentRangeEnable(lcdSegment16_19, true);\
\r
173 LCD_SegmentRangeEnable(lcdSegment28_31, true);\
\r
174 LCD_SegmentRangeEnable(lcdSegment32_35, true);\
\r
175 LCD_SegmentRangeEnable(lcdSegment36_39, true);\
\r
178 #define LCD_DISPLAY_ENABLE() \
\r
183 #define EFM_DISPLAY_DEF {\
\r
186 .com[0] = 1, .com[1] = 1, .com[2] = 5, .com[3] = 7,\
\r
187 .bit[0] = 13, .bit[1] = 14, .bit[2] = 14, .bit[3] = 14,\
\r
188 .com[4] = 7, .com[5] = 3, .com[6] = 4, .com[7] = 2,\
\r
189 .bit[4] = 13, .bit[5] = 13, .bit[6] = 13, .bit[7] = 13,\
\r
190 .com[8] = 3, .com[9] = 2, .com[10] = 4, .com[11] = 6,\
\r
191 .bit[8] = 14, .bit[9] = 14, .bit[10] = 14, .bit[11] = 14,\
\r
192 .com[12] = 5, .com[13] = 6,\
\r
193 .bit[12] = 13, .bit[13] = 13\
\r
196 .com[0] = 1, .com[1] = 1, .com[2] = 5, .com[3] = 7,\
\r
197 .bit[0] = 15, .bit[1] = 16, .bit[2] = 16, .bit[3] = 16,\
\r
198 .com[4] = 7, .com[5] = 3, .com[6] = 4, .com[7] = 2,\
\r
199 .bit[4] = 15, .bit[5] = 15, .bit[6] = 15, .bit[7] = 15,\
\r
200 .com[8] = 3, .com[9] = 2, .com[10] = 4, .com[11] = 6,\
\r
201 .bit[8] = 16, .bit[9] = 16, .bit[10] = 16, .bit[11] = 16,\
\r
202 .com[12] = 5, .com[13] = 6,\
\r
203 .bit[12] = 15, .bit[13] = 15\
\r
206 .com[0] = 1, .com[1] = 1, .com[2] = 5, .com[3] = 7,\
\r
207 .bit[0] = 17, .bit[1] = 18, .bit[2] = 18, .bit[3] = 18,\
\r
208 .com[4] = 7, .com[5] = 3, .com[6] = 4, .com[7] = 2,\
\r
209 .bit[4] = 17, .bit[5] = 17, .bit[6] = 17, .bit[7] = 17,\
\r
210 .com[8] = 3, .com[9] = 2, .com[10] = 4, .com[11] = 6,\
\r
211 .bit[8] = 18, .bit[9] = 18, .bit[10] = 18, .bit[11] = 18,\
\r
212 .com[12] = 5, .com[13] = 6,\
\r
213 .bit[12] = 17, .bit[13] = 17\
\r
216 .com[0] = 1, .com[1] = 1, .com[2] = 5, .com[3] = 7,\
\r
217 .bit[0] = 19, .bit[1] = 28, .bit[2] = 28, .bit[3] = 28,\
\r
218 .com[4] = 7, .com[5] = 3, .com[6] = 4, .com[7] = 2,\
\r
219 .bit[4] = 19, .bit[5] = 19, .bit[6] = 19, .bit[7] = 19,\
\r
220 .com[8] = 3, .com[9] = 2, .com[10] = 4, .com[11] = 6,\
\r
221 .bit[8] = 28, .bit[9] = 28, .bit[10] = 28, .bit[11] = 28,\
\r
222 .com[12] = 5, .com[13] = 6,\
\r
223 .bit[12] = 19, .bit[13] = 19\
\r
226 .com[0] = 0, .com[1] = 1, .com[2] = 5, .com[3] = 7,\
\r
227 .bit[0] = 29, .bit[1] = 30, .bit[2] = 30, .bit[3] = 30,\
\r
228 .com[4] = 6, .com[5] = 2, .com[6] = 3, .com[7] = 1,\
\r
229 .bit[4] = 29, .bit[5] = 29, .bit[6] = 29, .bit[7] = 29,\
\r
230 .com[8] = 3, .com[9] = 2, .com[10] = 4, .com[11] = 6,\
\r
231 .bit[8] = 30, .bit[9] = 30, .bit[10] = 30, .bit[11] = 30,\
\r
232 .com[12] = 4, .com[13] = 5,\
\r
233 .bit[12] = 29, .bit[13] = 29\
\r
236 .com[0] = 0, .com[1] = 1, .com[2] = 5, .com[3] = 7,\
\r
237 .bit[0] = 31, .bit[1] = 32, .bit[2] = 32, .bit[3] = 32,\
\r
238 .com[4] = 6, .com[5] = 2, .com[6] = 3, .com[7] = 1,\
\r
239 .bit[4] = 31, .bit[5] = 31, .bit[6] = 31, .bit[7] = 31,\
\r
240 .com[8] = 3, .com[9] = 2, .com[10] = 4, .com[11] = 6,\
\r
241 .bit[8] = 32, .bit[9] = 32, .bit[10] = 32, .bit[11] = 32,\
\r
242 .com[12] = 4, .com[13] = 5,\
\r
243 .bit[12] = 31, .bit[13] = 31\
\r
246 .com[0] = 1, .com[1] = 1, .com[2] = 5, .com[3] = 7,\
\r
247 .bit[0] = 33, .bit[1] = 34, .bit[2] = 34, .bit[3] = 34,\
\r
248 .com[4] = 7, .com[5] = 3, .com[6] = 4, .com[7] = 2,\
\r
249 .bit[4] = 33, .bit[5] = 33, .bit[6] = 33, .bit[7] = 33,\
\r
250 .com[8] = 3, .com[9] = 2, .com[10] = 4, .com[11] = 6,\
\r
251 .bit[8] = 34, .bit[9] = 34, .bit[10] = 34, .bit[11] = 34,\
\r
252 .com[12] = 5, .com[13] = 6,\
\r
253 .bit[12] = 33, .bit[13] = 33\
\r
258 .com[0] = 7, .com[1] = 5, .com[2] = 2, .com[3] = 1,\
\r
259 .bit[0] = 35, .bit[1] = 35, .bit[2] = 35, .bit[3] = 35,\
\r
260 .com[4] = 3, .com[5] = 6, .com[6] = 4,\
\r
261 .bit[4] = 35, .bit[5] = 35, .bit[6] = 35,\
\r
264 .com[0] = 7, .com[1] = 5, .com[2] = 2, .com[3] = 1,\
\r
265 .bit[0] = 36, .bit[1] = 36, .bit[2] = 36, .bit[3] = 36,\
\r
266 .com[4] = 3, .com[5] = 6, .com[6] = 4,\
\r
267 .bit[4] = 36, .bit[5] = 36, .bit[6] = 36,\
\r
270 .com[0] = 7, .com[1] = 5, .com[2] = 2, .com[3] = 1,\
\r
271 .bit[0] = 37, .bit[1] = 37, .bit[2] = 37, .bit[3] = 37,\
\r
272 .com[4] = 3, .com[5] = 6, .com[6] = 4,\
\r
273 .bit[4] = 37, .bit[5] = 37, .bit[6] = 37,\
\r
276 .com[0] = 7, .com[1] = 5, .com[2] = 2, .com[3] = 1,\
\r
277 .bit[0] = 38, .bit[1] = 38, .bit[2] = 38, .bit[3] = 38,\
\r
278 .com[4] = 3, .com[5] = 6, .com[6] = 4,\
\r
279 .bit[4] = 38, .bit[5] = 38, .bit[6] = 38,\
\r
283 .com[0] = 0, .bit[0] = 39,\
\r
284 .com[1] = 1, .bit[1] = 39,\
\r
285 .com[2] = 7, .bit[2] = 39,\
\r
286 .com[3] = 2, .bit[3] = 39,\
\r
287 .com[4] = 6, .bit[4] = 39,\
\r
290 .com[0] = 0, .bit[0] = 19,\
\r
291 .com[1] = 0, .bit[1] = 18,\
\r
292 .com[2] = 0, .bit[2] = 17,\
\r
293 .com[3] = 0, .bit[3] = 16,\
\r
294 .com[4] = 0, .bit[4] = 15,\
\r
295 .com[5] = 0, .bit[5] = 14,\
\r
296 .com[6] = 0, .bit[6] = 13,\
\r
297 .com[7] = 0, .bit[7] = 12,\
\r
300 .com[0] = 0, .bit[0] = 33,\
\r
301 .com[1] = 0, .bit[1] = 37,\
\r
302 .com[2] = 0, .bit[2] = 36,\
\r
303 .com[3] = 0, .bit[3] = 38,\
\r