38
|
1
|
|
2 #include "stm32f4xx_hal.h" /* for HAL_Delay() */
|
|
3 #include "ostc.h"
|
|
4 #include "display.h"
|
|
5
|
871
|
6 #define TFT_ENABLE_EXTENDED_COMMANDS 0xB9
|
|
7 #define TFT_SET_POWER 0xB1
|
|
8 #define TFT_SLEEP_OUT 0x11
|
|
9 #define TFT_DISPLAY_INVERSION_OFF 0x20
|
|
10 #define TFT_MEMORY_ACCESS_ONTROL 0x36
|
|
11 #define TFT_INTERFACE_PIXEL_FORMAT 0x3A
|
|
12 #define TFT_SET_RGB_INTERFACE_RELATED 0xB3
|
|
13 #define TFT_SET_DISPLAY_WAVEFORM 0xB4
|
|
14 #define TFT_SET_PANEL 0xCC
|
|
15 #define TFT_SET_GAMMA_CURVE_RELATED 0xE0
|
|
16 #define TFT_DISPLAY_ON 0x29
|
|
17 #define TFT_DISPLAY_OFF 0x28
|
|
18 #define TFT_SLEEP_IN 0x10
|
38
|
19
|
871
|
20 #define OLED_SCTE_SET_31h 0x31 // 0x0008
|
|
21 #define OLED_WCWE_SET_32h 0x32 // 0x0014
|
|
22 #define OLED_GATELESS1_30h 0x30 // 0x0002
|
|
23 #define OLED_GATELESS2_27h 0x27 // 0x0000
|
|
24 #define OLED_OSCILLATOR 0x11 // 0x00A1
|
|
25 #define OLED_VBP_SET_12h 0x12 // 0x0008
|
|
26 #define OLED_VFP_SET_13h 0x13 // 0x0008
|
|
27 #define OLED_DISPLAY_CON_15h 0x15 // 0x0000
|
|
28 #define OLED_COLOR_DEPTH_SET_16h 0x16 // 0x0000
|
|
29 #define OLED_PENTILE_KEY_EFh 0xEF // 0x00D0 or 0x00E8
|
|
30 #define OLED_PENTILE1_A0h 0xA0 // 0x0063
|
|
31 #define OLED_PENTILE2_A1h 0xA1 // 0x00C0
|
|
32 #define OLED_PENTILE3_A2h 0xA2 // 0x0032
|
|
33 #define OLED_PENTILE4_A3h 0xA3 // 0x0002
|
|
34 #define OLED_BRIGHTNESS_CTRL_39h 0x39 // 0044h
|
|
35 // gamma table 0x40 - 0x66
|
|
36 #define OLED_BOOSTING_FREQ 0x17 // 0x0022
|
|
37 #define OLED_AMP_SET_18h 0x18 // 0x0033
|
|
38 #define OLED_GAMMA_AMP_19h 0x19 // 0x0003
|
|
39 #define OLED_POWER_CONTROL2_1Ah 0x1A // 0x0001
|
|
40 #define OLED_POWER_CONTROL2_1Bh 0x1B //
|
|
41 #define OLED_POWER_CONTROL2_1Ch 0x1C //
|
|
42 #define OLED_INTERNAL_LOGIC_VOLTAGE 0x22 // VCC*0,65 = 3,3V * 0,55 = 0x00A2
|
|
43 #define OLED_POWER_SET 0x23 // VC1OUT = VCI X 0.98 (default) = 0x00
|
|
44 #define OLED_POWER_SET2 0x24 // VREG2OUT = 5,4V, VREG1OUT = 4,2V =0x77
|
|
45 #define OLED_DISPLAY_CONDITION_SET_26h 0x26 // 0x00A0
|
878
|
46 #define OLED_STB_BY_OFF_1Dh 0x1D // 00A0 + 300ms wait
|
|
47 #define OLED_DDISP_ON_14h 0x14 // 0003
|
38
|
48
|
|
49 static void Display_Error_Handler(void);
|
871
|
50 static void display_power_on__2_of_2__post_RGB_display0(void);
|
|
51 static void display_power_on__2_of_2__post_RGB_display1(void);
|
878
|
52 void display_1_brightness_max(void);
|
|
53 void display_1_brightness_high(void);
|
|
54 void display_1_brightness_std(void);
|
|
55 void display_1_brightness_eco(void);
|
|
56 void display_1_brightness_cave(void);
|
|
57
|
871
|
58 static uint8_t receive_screen();
|
878
|
59 uint8_t brightness_screen1;
|
38
|
60
|
|
61 void display_power_on__1_of_2__pre_RGB(void)
|
|
62 {
|
871
|
63 uint8_t aTxBuffer[3];
|
|
64 /* reset system */
|
38
|
65 HAL_GPIO_WritePin(DISPLAY_CSB_GPIO_PORT,DISPLAY_CSB_PIN,GPIO_PIN_SET); // chip select
|
|
66
|
|
67 HAL_GPIO_WritePin(DISPLAY_RESETB_GPIO_PORT,DISPLAY_RESETB_PIN,GPIO_PIN_RESET);
|
|
68 HAL_Delay(10);
|
|
69 HAL_GPIO_WritePin(DISPLAY_RESETB_GPIO_PORT,DISPLAY_RESETB_PIN,GPIO_PIN_SET);
|
871
|
70 HAL_Delay(25);
|
885
|
71
|
871
|
72 // check for new screen
|
|
73 aTxBuffer[0] = 0x71; // Read internal register
|
|
74 if (receive_screen((uint8_t*)aTxBuffer) == 0x27) // chip Index (=0x27 for new screen)
|
885
|
75 {
|
|
76 SetDisplayVersion(DISPLAY_VERSION_NEW);
|
|
77 }
|
873
|
78 else
|
|
79 { // re-reset the screen to be sure the 0x71 command did nothing
|
|
80 HAL_GPIO_WritePin(DISPLAY_RESETB_GPIO_PORT,DISPLAY_RESETB_PIN,GPIO_PIN_RESET);
|
|
81 HAL_Delay(10);
|
|
82 HAL_GPIO_WritePin(DISPLAY_RESETB_GPIO_PORT,DISPLAY_RESETB_PIN,GPIO_PIN_SET);
|
|
83 HAL_Delay(25);
|
|
84
|
885
|
85 SetDisplayVersion(DISPLAY_VERSION_LCD);
|
873
|
86 }
|
38
|
87
|
|
88 /* RGB signals should be now for 2 frames or more (datasheet) */
|
|
89 }
|
|
90
|
|
91
|
300
|
92 static void send(uint8_t *pData, uint16_t inputlength)
|
38
|
93 {
|
|
94 HAL_GPIO_WritePin(DISPLAY_CSB_GPIO_PORT,DISPLAY_CSB_PIN,GPIO_PIN_RESET); // chip select
|
|
95
|
|
96 if(HAL_SPI_Transmit(&hspiDisplay,(uint8_t*)pData, inputlength, 10000) != HAL_OK)
|
|
97 Display_Error_Handler();
|
|
98
|
|
99 while (HAL_SPI_GetState(&hspiDisplay) != HAL_SPI_STATE_READY)
|
|
100 {
|
|
101 }
|
|
102 HAL_GPIO_WritePin(DISPLAY_CSB_GPIO_PORT,DISPLAY_CSB_PIN,GPIO_PIN_SET); // chip select
|
|
103 }
|
|
104
|
871
|
105 static uint8_t receive_screen(uint8_t *pData)
|
|
106 {
|
|
107 uint8_t byte;
|
|
108 HAL_GPIO_WritePin(DISPLAY_CSB_GPIO_PORT,DISPLAY_CSB_PIN,GPIO_PIN_RESET); // chip select
|
|
109 if(HAL_SPI_Transmit(&hspiDisplay,(uint8_t*)pData, 1, 10000) != HAL_OK)
|
|
110 Display_Error_Handler();
|
|
111 while (HAL_SPI_GetState(&hspiDisplay) != HAL_SPI_STATE_READY)
|
|
112 {
|
|
113 }
|
|
114 if(HAL_SPI_Receive(&hspiDisplay, &byte, 1, 10000) != HAL_OK)
|
|
115 Display_Error_Handler();
|
|
116 while (HAL_SPI_GetState(&hspiDisplay) != HAL_SPI_STATE_READY)
|
|
117 {
|
|
118 }
|
|
119 HAL_GPIO_WritePin(DISPLAY_CSB_GPIO_PORT,DISPLAY_CSB_PIN,GPIO_PIN_SET); // chip select
|
|
120 return byte;
|
|
121 }
|
|
122
|
38
|
123
|
300
|
124 static uint16_t convert8to9to8(uint8_t *pInput, uint8_t *pOutput,uint16_t inputlength)
|
38
|
125 {
|
|
126 uint16_t outputlength;
|
|
127 uint8_t readbit = 0x80;//0b1000000;
|
|
128 uint8_t writebit = 0x40;//0b0100000;
|
|
129 uint16_t i,j,k;
|
|
130
|
|
131 outputlength = ((inputlength+7)/8)*9;
|
|
132
|
|
133 for(i=0;i<outputlength;i++)
|
|
134 pOutput[i] = 0;
|
|
135
|
|
136 k = 0;
|
|
137 for(i=0;i<inputlength;i++)
|
|
138 {
|
|
139 if(i != 0)
|
|
140 {
|
|
141 pOutput[k] |= writebit; // 9. bit
|
|
142 writebit = writebit >> 1;
|
|
143 if(writebit == 0)
|
|
144 {
|
|
145 writebit = 0x80;
|
|
146 k++;
|
|
147 }
|
|
148 }
|
|
149 for(j=0;j<8;j++)
|
|
150 {
|
|
151 if((pInput[i] & readbit) != 0)
|
|
152 {
|
|
153 pOutput[k] |= writebit;
|
|
154 }
|
|
155 readbit = readbit >> 1;
|
|
156 if(readbit == 0)
|
|
157 readbit = 0x80;
|
|
158 writebit = writebit >> 1;
|
|
159 if(writebit == 0)
|
|
160 {
|
|
161 writebit = 0x80;
|
|
162 k++;
|
|
163 }
|
|
164 }
|
|
165 }
|
|
166 return outputlength;
|
|
167 }
|
|
168
|
878
|
169 void display_power_off(void)
|
|
170 {
|
885
|
171 if (isNewDisplay())
|
878
|
172 {
|
|
173 uint8_t aTxBuffer[3];
|
|
174
|
|
175 aTxBuffer[0] = 0x70;
|
|
176 aTxBuffer[1] = OLED_DDISP_ON_14h;
|
|
177 send((uint8_t*)aTxBuffer, 2);
|
|
178 aTxBuffer[0] = 0x72;
|
|
179 aTxBuffer[1] = 0x00;
|
|
180 send((uint8_t*)aTxBuffer, 2);
|
|
181 HAL_Delay(25);
|
|
182 aTxBuffer[0] = 0x70;
|
|
183 aTxBuffer[1] = OLED_STB_BY_OFF_1Dh;
|
|
184 send((uint8_t*)aTxBuffer, 2);
|
|
185 aTxBuffer[0] = 0x72;
|
|
186 aTxBuffer[1] = 0xA1;
|
|
187 send((uint8_t*)aTxBuffer, 2);
|
|
188 HAL_Delay(200);
|
|
189 HAL_GPIO_WritePin(DISPLAY_RESETB_GPIO_PORT,DISPLAY_RESETB_PIN,GPIO_PIN_RESET);
|
|
190 }
|
|
191 else
|
|
192 {
|
|
193 // display 0
|
|
194 }
|
|
195 }
|
|
196
|
|
197
|
38
|
198 void display_power_on__2_of_2__post_RGB(void)
|
|
199 {
|
885
|
200 if (isNewDisplay())
|
871
|
201 {
|
|
202 display_power_on__2_of_2__post_RGB_display1();
|
|
203 }
|
|
204 else
|
|
205 {
|
|
206 display_power_on__2_of_2__post_RGB_display0();
|
|
207 }
|
|
208 }
|
|
209
|
|
210 void display_power_on__2_of_2__post_RGB_display0(void)
|
|
211 {
|
|
212
|
38
|
213 uint8_t aTxBuffer[32];
|
|
214 uint8_t bTxBuffer[36];
|
|
215 uint16_t i,length;
|
|
216
|
|
217 for(i=0;i<32;i++)
|
|
218 aTxBuffer[i] = 0;
|
|
219 for(i=0;i<36;i++)
|
|
220 bTxBuffer[i] = 0;
|
|
221
|
871
|
222 aTxBuffer[0] = TFT_ENABLE_EXTENDED_COMMANDS;
|
38
|
223 aTxBuffer[1] = 0xFF;
|
|
224 aTxBuffer[2] = 0x83;
|
|
225 aTxBuffer[3] = 0x63;
|
|
226 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,4);
|
|
227 send((uint8_t*)bTxBuffer, length);
|
|
228
|
871
|
229 aTxBuffer[0] = TFT_SET_POWER;
|
38
|
230 aTxBuffer[1] = 0x81;
|
|
231 aTxBuffer[2] = 0x24;
|
|
232 aTxBuffer[3] = 0x04;
|
|
233 aTxBuffer[4] = 0x02;
|
|
234 aTxBuffer[5] = 0x02;
|
|
235 aTxBuffer[6] = 0x03;
|
|
236 aTxBuffer[7] = 0x10;
|
|
237 aTxBuffer[8] = 0x10;
|
|
238 aTxBuffer[9] = 0x34;
|
|
239 aTxBuffer[10] = 0x3C;
|
|
240 aTxBuffer[11] = 0x3F;
|
|
241 aTxBuffer[12] = 0x3F;
|
|
242 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,13);
|
|
243 send((uint8_t*)bTxBuffer, length);
|
|
244
|
871
|
245 aTxBuffer[0] = TFT_SLEEP_OUT;
|
38
|
246 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,1);
|
|
247 send((uint8_t*)bTxBuffer, length);
|
|
248 HAL_Delay(5+1);
|
|
249
|
871
|
250 aTxBuffer[0] = TFT_DISPLAY_INVERSION_OFF;
|
38
|
251 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,1);
|
|
252 send((uint8_t*)bTxBuffer, length);
|
|
253
|
871
|
254 aTxBuffer[0] = TFT_MEMORY_ACCESS_ONTROL;
|
38
|
255 aTxBuffer[1] = 0x00;
|
|
256 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,2);
|
|
257 send((uint8_t*)bTxBuffer, length);
|
|
258
|
871
|
259 aTxBuffer[0] = TFT_INTERFACE_PIXEL_FORMAT;
|
38
|
260 aTxBuffer[1] = 0x70;
|
|
261 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,2);
|
|
262 send((uint8_t*)bTxBuffer, length);
|
|
263 HAL_Delay(120+20);
|
|
264
|
871
|
265 aTxBuffer[0] = TFT_SET_POWER;
|
38
|
266 aTxBuffer[1] = 0x78;
|
|
267 aTxBuffer[2] = 0x24;
|
|
268 aTxBuffer[3] = 0x04,
|
|
269 aTxBuffer[4] = 0x02;
|
|
270 aTxBuffer[5] = 0x02;
|
|
271 aTxBuffer[6] = 0x03;
|
|
272 aTxBuffer[7] = 0x10;
|
|
273 aTxBuffer[8] = 0x10;
|
|
274 aTxBuffer[9] = 0x34;
|
|
275 aTxBuffer[10] = 0x3C;
|
|
276 aTxBuffer[11] = 0x3F;
|
|
277 aTxBuffer[12] = 0x3F;
|
|
278 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,13);
|
|
279 send((uint8_t*)bTxBuffer, length);
|
|
280
|
871
|
281 aTxBuffer[0] = TFT_SET_RGB_INTERFACE_RELATED;
|
38
|
282 aTxBuffer[1] = 0x01;
|
|
283 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,2);
|
|
284 send((uint8_t*)bTxBuffer, length);
|
|
285
|
871
|
286 aTxBuffer[0] = TFT_SET_DISPLAY_WAVEFORM;
|
38
|
287 aTxBuffer[1] = 0x00;
|
|
288 aTxBuffer[2] = 0x08;
|
|
289 aTxBuffer[3] = 0x56;
|
|
290 aTxBuffer[4] = 0x07;
|
|
291 aTxBuffer[5] = 0x01;
|
|
292 aTxBuffer[6] = 0x01;
|
|
293 aTxBuffer[7] = 0x4D;
|
|
294 aTxBuffer[8] = 0x01;
|
|
295 aTxBuffer[9] = 0x42;
|
|
296 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,10);
|
|
297 send((uint8_t*)bTxBuffer, length);
|
|
298
|
871
|
299 aTxBuffer[0] = TFT_SET_PANEL;
|
38
|
300 aTxBuffer[1] = 0x0B;
|
|
301 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,2);
|
|
302 send((uint8_t*)bTxBuffer, length);
|
|
303
|
871
|
304 aTxBuffer[0] = TFT_SET_GAMMA_CURVE_RELATED;
|
38
|
305 aTxBuffer[1] = 0x01;
|
|
306 aTxBuffer[2] = 0x48;
|
|
307 aTxBuffer[3] = 0x4D;
|
|
308 aTxBuffer[4] = 0x4E;
|
|
309 aTxBuffer[5] = 0x58;
|
|
310 aTxBuffer[6] = 0xF6;
|
|
311 aTxBuffer[7] = 0x0B;
|
|
312 aTxBuffer[8] = 0x4E;
|
|
313 aTxBuffer[9] = 0x12;
|
|
314 aTxBuffer[10] = 0xD5;
|
|
315 aTxBuffer[11] = 0x15;
|
|
316 aTxBuffer[12] = 0x95;
|
|
317 aTxBuffer[13] = 0x55;
|
|
318 aTxBuffer[14] = 0x8E;
|
|
319 aTxBuffer[15] = 0x11;
|
|
320 aTxBuffer[16] = 0x01;
|
|
321 aTxBuffer[17] = 0x48;
|
|
322 aTxBuffer[18] = 0x4D;
|
|
323 aTxBuffer[19] = 0x55;
|
|
324 aTxBuffer[20] = 0x5F;
|
|
325 aTxBuffer[21] = 0xFD;
|
|
326 aTxBuffer[22] = 0x0A;
|
|
327 aTxBuffer[23] = 0x4E;
|
|
328 aTxBuffer[24] = 0x51;
|
|
329 aTxBuffer[25] = 0xD3;
|
|
330 aTxBuffer[26] = 0x17;
|
|
331 aTxBuffer[27] = 0x95;
|
|
332 aTxBuffer[28] = 0x96;
|
|
333 aTxBuffer[29] = 0x4E;
|
|
334 aTxBuffer[30] = 0x11;
|
|
335 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,31);
|
|
336 send((uint8_t*)bTxBuffer, length);
|
|
337 HAL_Delay(5+1);
|
|
338
|
871
|
339 aTxBuffer[0] = TFT_DISPLAY_ON;
|
38
|
340 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,1);
|
|
341 send((uint8_t*)bTxBuffer, length);
|
|
342 }
|
|
343
|
|
344
|
871
|
345 void display_power_on__2_of_2__post_RGB_display1(void)
|
|
346 {
|
|
347 uint8_t aTxBuffer[3];
|
|
348
|
|
349 aTxBuffer[0] = 0x71; // Read chip Index & revision number
|
|
350 aTxBuffer[1] = 0x00; // Dummy write - reads out 0x27
|
|
351 aTxBuffer[1] = 0x00; // Dummy write - reads out 0x96
|
|
352 send((uint8_t*)aTxBuffer, 3);
|
|
353
|
|
354 aTxBuffer[0] = 0x70;
|
|
355 aTxBuffer[1] = OLED_OSCILLATOR;
|
|
356 send((uint8_t*)aTxBuffer, 2);
|
|
357 aTxBuffer[0] = 0x72;
|
|
358 aTxBuffer[1] = 0xA4;
|
|
359 send((uint8_t*)aTxBuffer, 2);
|
|
360
|
|
361 aTxBuffer[0] = 0x70;
|
|
362 aTxBuffer[1] = OLED_SCTE_SET_31h;
|
|
363 send((uint8_t*)aTxBuffer, 2);
|
|
364 aTxBuffer[0] = 0x72;
|
|
365 aTxBuffer[1] = 0x08;//8
|
|
366 send((uint8_t*)aTxBuffer, 2);
|
|
367
|
878
|
368 /*//debug read
|
871
|
369 aTxBuffer[0] = 0x70;
|
|
370 aTxBuffer[1] = OLED_SCTE_SET_31h;
|
|
371 send((uint8_t*)aTxBuffer, 2);
|
|
372 aTxBuffer[0] = 0x73; // Read internal register
|
|
373 aTxBuffer[1] = 0x00; // Dummy write - reads out 0x08 (The just-set OLED_SCTE_SET value)
|
|
374 send((uint8_t*)aTxBuffer, 2);
|
878
|
375 */
|
871
|
376
|
|
377 aTxBuffer[0] = 0x70;
|
|
378 aTxBuffer[1] = OLED_WCWE_SET_32h;
|
|
379 send((uint8_t*)aTxBuffer, 2);
|
|
380 aTxBuffer[0] = 0x72;
|
|
381 aTxBuffer[1] = 0x14;//14
|
|
382 send((uint8_t*)aTxBuffer, 2);
|
|
383
|
|
384 aTxBuffer[0] = 0x70;
|
|
385 aTxBuffer[1] = OLED_GATELESS1_30h;
|
|
386 send((uint8_t*)aTxBuffer, 2);
|
|
387 aTxBuffer[0] = 0x72;
|
|
388 aTxBuffer[1] = 0x02;
|
|
389 send((uint8_t*)aTxBuffer, 2);
|
|
390
|
|
391 aTxBuffer[0] = 0x70;
|
|
392 aTxBuffer[1] = OLED_GATELESS2_27h;
|
|
393 send((uint8_t*)aTxBuffer, 2);
|
|
394 aTxBuffer[0] = 0x72;
|
|
395 aTxBuffer[1] = 0x01;
|
|
396 send((uint8_t*)aTxBuffer, 2);
|
|
397
|
|
398
|
|
399 aTxBuffer[0] = 0x70;
|
|
400 aTxBuffer[1] = OLED_VBP_SET_12h;
|
|
401 send((uint8_t*)aTxBuffer, 2);
|
|
402 aTxBuffer[0] = 0x72;
|
|
403 aTxBuffer[1] = 0x08;
|
|
404 send((uint8_t*)aTxBuffer, 2);
|
|
405
|
|
406 aTxBuffer[0] = 0x70;
|
|
407 aTxBuffer[1] = OLED_VFP_SET_13h;
|
|
408 send((uint8_t*)aTxBuffer, 2);
|
|
409 aTxBuffer[0] = 0x72;
|
|
410 aTxBuffer[1] = 0x08;
|
|
411 send((uint8_t*)aTxBuffer, 2);
|
|
412
|
|
413 aTxBuffer[0] = 0x70;
|
|
414 aTxBuffer[1] = OLED_DISPLAY_CON_15h;
|
|
415 send((uint8_t*)aTxBuffer, 2);
|
|
416 aTxBuffer[0] = 0x72;
|
|
417 aTxBuffer[1] = 0x01; //SS=0
|
|
418 //aTxBuffer[1] = 0x11; //SS=1
|
|
419 send((uint8_t*)aTxBuffer, 2);
|
|
420
|
|
421 aTxBuffer[0] = 0x70;
|
|
422 aTxBuffer[1] = OLED_COLOR_DEPTH_SET_16h;
|
|
423 send((uint8_t*)aTxBuffer, 2);
|
|
424 aTxBuffer[0] = 0x72;
|
|
425 aTxBuffer[1] = 0x00;
|
|
426 send((uint8_t*)aTxBuffer, 2);
|
|
427
|
|
428 aTxBuffer[0] = 0x70;
|
|
429 aTxBuffer[1] = OLED_PENTILE_KEY_EFh; // write-only register...
|
|
430 send((uint8_t*)aTxBuffer, 2);
|
|
431 aTxBuffer[0] = 0x72;
|
|
432 aTxBuffer[1] = 0xD0;
|
|
433 send((uint8_t*)aTxBuffer, 2);
|
|
434 aTxBuffer[0] = 0x72;
|
|
435 aTxBuffer[1] = 0xE8;
|
|
436 send((uint8_t*)aTxBuffer, 2);
|
|
437
|
|
438 aTxBuffer[0] = 0x70;
|
|
439 aTxBuffer[1] = OLED_PENTILE1_A0h; // write-only register...
|
|
440 send((uint8_t*)aTxBuffer, 2);
|
|
441 aTxBuffer[0] = 0x72;
|
|
442 aTxBuffer[1] = 0x00;
|
|
443 send((uint8_t*)aTxBuffer, 2);
|
|
444 aTxBuffer[0] = 0x72;
|
|
445 aTxBuffer[1] = 0x63;
|
|
446 send((uint8_t*)aTxBuffer, 2);
|
|
447
|
|
448 aTxBuffer[0] = 0x70;
|
|
449 aTxBuffer[1] = OLED_PENTILE2_A1h; // write-only register...
|
|
450 send((uint8_t*)aTxBuffer, 2);
|
|
451 aTxBuffer[0] = 0x72;
|
|
452 aTxBuffer[1] = 0x00;
|
|
453 send((uint8_t*)aTxBuffer, 2);
|
|
454 aTxBuffer[0] = 0x72;
|
|
455 aTxBuffer[1] = 0xC0; // SID1&SID0=00
|
|
456 // aTxBuffer[1] = 0xC4; // SID1&SID0=01 CC C8 C4 C0
|
|
457 send((uint8_t*)aTxBuffer, 2);
|
|
458
|
|
459 aTxBuffer[0] = 0x70;
|
|
460 aTxBuffer[1] = OLED_PENTILE3_A2h; // write-only register...
|
|
461 send((uint8_t*)aTxBuffer, 2);
|
|
462 aTxBuffer[0] = 0x72;
|
|
463 aTxBuffer[1] = 0x00;
|
|
464 send((uint8_t*)aTxBuffer, 2);
|
|
465 aTxBuffer[0] = 0x72;
|
|
466 aTxBuffer[1] = 0x32;
|
|
467 send((uint8_t*)aTxBuffer, 2);
|
|
468
|
|
469 aTxBuffer[0] = 0x70;
|
|
470 aTxBuffer[1] = OLED_PENTILE4_A3h; // write-only register...
|
|
471 send((uint8_t*)aTxBuffer, 2);
|
|
472 aTxBuffer[0] = 0x72;
|
|
473 aTxBuffer[1] = 0x00;
|
|
474 send((uint8_t*)aTxBuffer, 2);
|
|
475 aTxBuffer[0] = 0x72;
|
|
476 aTxBuffer[1] = 0x02;
|
|
477 send((uint8_t*)aTxBuffer, 2);
|
|
478
|
|
479 aTxBuffer[0] = 0x70;
|
|
480 aTxBuffer[1] = OLED_BRIGHTNESS_CTRL_39h;
|
|
481 send((uint8_t*)aTxBuffer, 2);
|
|
482 aTxBuffer[0] = 0x72;
|
|
483 aTxBuffer[1] = 0x44;//44
|
|
484 send((uint8_t*)aTxBuffer, 2);
|
|
485
|
878
|
486
|
|
487 display_1_brightness_std(); // boot brightness
|
|
488
|
|
489
|
|
490 aTxBuffer[0] = 0x70;
|
|
491 aTxBuffer[1] = OLED_BOOSTING_FREQ;
|
|
492 send((uint8_t*)aTxBuffer, 2);
|
|
493 aTxBuffer[0] = 0x72;
|
|
494 aTxBuffer[1] = 0x22;
|
|
495 send((uint8_t*)aTxBuffer, 2);
|
|
496
|
|
497 aTxBuffer[0] = 0x70;
|
|
498 aTxBuffer[1] = OLED_AMP_SET_18h;
|
|
499 send((uint8_t*)aTxBuffer, 2);
|
|
500 aTxBuffer[0] = 0x72;
|
|
501 aTxBuffer[1] = 0x22;
|
|
502 send((uint8_t*)aTxBuffer, 2);
|
|
503
|
|
504 aTxBuffer[0] = 0x70;
|
|
505 aTxBuffer[1] = OLED_GAMMA_AMP_19h;
|
|
506 send((uint8_t*)aTxBuffer, 2);
|
|
507 aTxBuffer[0] = 0x72;
|
|
508 aTxBuffer[1] = 0x02;
|
|
509 send((uint8_t*)aTxBuffer, 2);
|
|
510
|
|
511 aTxBuffer[0] = 0x70;
|
|
512 aTxBuffer[1] = OLED_POWER_CONTROL2_1Ah;
|
|
513 send((uint8_t*)aTxBuffer, 2);
|
|
514 aTxBuffer[0] = 0x72;
|
|
515 aTxBuffer[1] = 0x00;
|
|
516 send((uint8_t*)aTxBuffer, 2);
|
|
517
|
|
518 /*
|
|
519 aTxBuffer[0] = 0x70;
|
|
520 aTxBuffer[1] = OLED_POWER_CONTROL2_1Bh;
|
|
521 send((uint8_t*)aTxBuffer, 2);
|
|
522 aTxBuffer[0] = 0x72;
|
|
523 aTxBuffer[1] = 0x4B;
|
|
524 send((uint8_t*)aTxBuffer, 2);
|
|
525
|
|
526 aTxBuffer[0] = 0x70;
|
|
527 aTxBuffer[1] = OLED_POWER_CONTROL2_1Ch;
|
|
528 send((uint8_t*)aTxBuffer, 2);
|
|
529 aTxBuffer[0] = 0x72;
|
|
530 aTxBuffer[1] = 0x05;
|
|
531 send((uint8_t*)aTxBuffer, 2);
|
|
532 */
|
|
533
|
|
534 aTxBuffer[0] = 0x70;
|
|
535 aTxBuffer[1] = OLED_INTERNAL_LOGIC_VOLTAGE;
|
|
536 send((uint8_t*)aTxBuffer, 2);
|
|
537 aTxBuffer[0] = 0x72;
|
|
538 aTxBuffer[1] = 0xA2;
|
|
539 send((uint8_t*)aTxBuffer, 2);
|
|
540
|
|
541 aTxBuffer[0] = 0x70;
|
|
542 aTxBuffer[1] = OLED_POWER_SET;
|
|
543 send((uint8_t*)aTxBuffer, 2);
|
|
544 aTxBuffer[0] = 0x72;
|
|
545 aTxBuffer[1] = 0x00;
|
|
546 send((uint8_t*)aTxBuffer, 2);
|
|
547
|
|
548 aTxBuffer[0] = 0x70;
|
|
549 aTxBuffer[1] = OLED_POWER_SET2;
|
|
550 send((uint8_t*)aTxBuffer, 2);
|
|
551 aTxBuffer[0] = 0x72;
|
|
552 aTxBuffer[1] = 0x77;
|
|
553 send((uint8_t*)aTxBuffer, 2);
|
|
554
|
|
555
|
|
556 aTxBuffer[0] = 0x70;
|
|
557 aTxBuffer[1] = OLED_DISPLAY_CONDITION_SET_26h;
|
|
558 send((uint8_t*)aTxBuffer, 2);
|
|
559 aTxBuffer[0] = 0x72;
|
|
560 aTxBuffer[1] = 0xA0;
|
|
561 send((uint8_t*)aTxBuffer, 2);
|
|
562
|
|
563 aTxBuffer[0] = 0x70;
|
|
564 aTxBuffer[1] = OLED_STB_BY_OFF_1Dh;
|
|
565 send((uint8_t*)aTxBuffer, 2);
|
|
566 aTxBuffer[0] = 0x72;
|
|
567 aTxBuffer[1] = 0xA0;
|
|
568 send((uint8_t*)aTxBuffer, 2);
|
|
569
|
|
570 HAL_Delay(250);
|
|
571
|
|
572 aTxBuffer[0] = 0x70;
|
|
573 aTxBuffer[1] = OLED_DDISP_ON_14h;
|
|
574 send((uint8_t*)aTxBuffer, 2);
|
|
575 aTxBuffer[0] = 0x72;
|
|
576 aTxBuffer[1] = 0x03;
|
|
577 send((uint8_t*)aTxBuffer, 2);
|
|
578 }
|
|
579
|
|
580 void display_1_brightness_max(void)
|
|
581 {
|
|
582 uint8_t aTxBuffer[3];
|
|
583
|
|
584 if (brightness_screen1 == 4)
|
|
585 {
|
|
586 // do nothing
|
|
587 }
|
|
588 else
|
|
589 {
|
|
590 // GAMMA L=250
|
|
591 aTxBuffer[0] = 0x70;
|
|
592 aTxBuffer[1] = 0x40;
|
|
593 send((uint8_t*)aTxBuffer, 2);
|
|
594 aTxBuffer[0] = 0x72;
|
|
595 aTxBuffer[1] = 0x00;
|
|
596 send((uint8_t*)aTxBuffer, 2);
|
|
597
|
|
598 aTxBuffer[0] = 0x70;
|
|
599 aTxBuffer[1] = 0x41;
|
|
600 send((uint8_t*)aTxBuffer, 2);
|
|
601 aTxBuffer[0] = 0x72;
|
|
602 aTxBuffer[1] = 0x3F;
|
|
603 send((uint8_t*)aTxBuffer, 2);
|
|
604
|
|
605 aTxBuffer[0] = 0x70;
|
|
606 aTxBuffer[1] = 0x42;
|
|
607 send((uint8_t*)aTxBuffer, 2);
|
|
608 aTxBuffer[0] = 0x72;
|
|
609 aTxBuffer[1] = 0x2A;
|
|
610 send((uint8_t*)aTxBuffer, 2);
|
|
611
|
|
612 aTxBuffer[0] = 0x70;
|
|
613 aTxBuffer[1] = 0x43;
|
|
614 send((uint8_t*)aTxBuffer, 2);
|
|
615 aTxBuffer[0] = 0x72;
|
|
616 aTxBuffer[1] = 0x27;
|
|
617 send((uint8_t*)aTxBuffer, 2);
|
|
618
|
|
619 aTxBuffer[0] = 0x70;
|
|
620 aTxBuffer[1] = 0x44;
|
|
621 send((uint8_t*)aTxBuffer, 2);
|
|
622 aTxBuffer[0] = 0x72;
|
|
623 aTxBuffer[1] = 0x27;
|
|
624 send((uint8_t*)aTxBuffer, 2);
|
|
625
|
|
626 aTxBuffer[0] = 0x70;
|
|
627 aTxBuffer[1] = 0x45;
|
|
628 send((uint8_t*)aTxBuffer, 2);
|
|
629 aTxBuffer[0] = 0x72;
|
|
630 aTxBuffer[1] = 0x1F;
|
|
631 send((uint8_t*)aTxBuffer, 2);
|
|
632
|
|
633 aTxBuffer[0] = 0x70;
|
|
634 aTxBuffer[1] = 0x46;
|
|
635 send((uint8_t*)aTxBuffer, 2);
|
|
636 aTxBuffer[0] = 0x72;
|
|
637 aTxBuffer[1] = 0x44;
|
|
638 send((uint8_t*)aTxBuffer, 2);
|
|
639
|
|
640 aTxBuffer[0] = 0x70;
|
|
641 aTxBuffer[1] = 0x50;
|
|
642 send((uint8_t*)aTxBuffer, 2);
|
|
643 aTxBuffer[0] = 0x72;
|
|
644 aTxBuffer[1] = 0x00;
|
|
645 send((uint8_t*)aTxBuffer, 2);
|
|
646
|
|
647 aTxBuffer[0] = 0x70;
|
|
648 aTxBuffer[1] = 0x51;
|
|
649 send((uint8_t*)aTxBuffer, 2);
|
|
650 aTxBuffer[0] = 0x72;
|
|
651 aTxBuffer[1] = 0x00;
|
|
652 send((uint8_t*)aTxBuffer, 2);
|
|
653
|
|
654 aTxBuffer[0] = 0x70;
|
|
655 aTxBuffer[1] = 0x52;
|
|
656 send((uint8_t*)aTxBuffer, 2);
|
|
657 aTxBuffer[0] = 0x72;
|
|
658 aTxBuffer[1] = 0x17;
|
|
659 send((uint8_t*)aTxBuffer, 2);
|
|
660
|
|
661 aTxBuffer[0] = 0x70;
|
|
662 aTxBuffer[1] = 0x53;
|
|
663 send((uint8_t*)aTxBuffer, 2);
|
|
664 aTxBuffer[0] = 0x72;
|
|
665 aTxBuffer[1] = 0x24;
|
|
666 send((uint8_t*)aTxBuffer, 2);
|
|
667
|
|
668 aTxBuffer[0] = 0x70;
|
|
669 aTxBuffer[1] = 0x54;
|
|
670 send((uint8_t*)aTxBuffer, 2);
|
|
671 aTxBuffer[0] = 0x72;
|
|
672 aTxBuffer[1] = 0x26;
|
|
673 send((uint8_t*)aTxBuffer, 2);
|
|
674
|
|
675 aTxBuffer[0] = 0x70;
|
|
676 aTxBuffer[1] = 0x55;
|
|
677 send((uint8_t*)aTxBuffer, 2);
|
|
678 aTxBuffer[0] = 0x72;
|
|
679 aTxBuffer[1] = 0x1F;
|
|
680 send((uint8_t*)aTxBuffer, 2);
|
|
681
|
|
682 aTxBuffer[0] = 0x70;
|
|
683 aTxBuffer[1] = 0x56;
|
|
684 send((uint8_t*)aTxBuffer, 2);
|
|
685 aTxBuffer[0] = 0x72;
|
|
686 aTxBuffer[1] = 0x43;
|
|
687 send((uint8_t*)aTxBuffer, 2);
|
|
688
|
|
689 aTxBuffer[0] = 0x70;
|
|
690 aTxBuffer[1] = 0x60;
|
|
691 send((uint8_t*)aTxBuffer, 2);
|
|
692 aTxBuffer[0] = 0x72;
|
|
693 aTxBuffer[1] = 0x00;
|
|
694 send((uint8_t*)aTxBuffer, 2);
|
|
695
|
|
696 aTxBuffer[0] = 0x70;
|
|
697 aTxBuffer[1] = 0x61;
|
|
698 send((uint8_t*)aTxBuffer, 2);
|
|
699 aTxBuffer[0] = 0x72;
|
|
700 aTxBuffer[1] = 0x3F;
|
|
701 send((uint8_t*)aTxBuffer, 2);
|
|
702
|
|
703 aTxBuffer[0] = 0x70;
|
|
704 aTxBuffer[1] = 0x62;
|
|
705 send((uint8_t*)aTxBuffer, 2);
|
|
706 aTxBuffer[0] = 0x72;
|
|
707 aTxBuffer[1] = 0x2A;
|
|
708 send((uint8_t*)aTxBuffer, 2);
|
|
709
|
|
710 aTxBuffer[0] = 0x70;
|
|
711 aTxBuffer[1] = 0x63;
|
|
712 send((uint8_t*)aTxBuffer, 2);
|
|
713 aTxBuffer[0] = 0x72;
|
|
714 aTxBuffer[1] = 0x25;
|
|
715 send((uint8_t*)aTxBuffer, 2);
|
|
716
|
|
717 aTxBuffer[0] = 0x70;
|
|
718 aTxBuffer[1] = 0x64;
|
|
719 send((uint8_t*)aTxBuffer, 2);
|
|
720 aTxBuffer[0] = 0x72;
|
|
721 aTxBuffer[1] = 0x24;
|
|
722 send((uint8_t*)aTxBuffer, 2);
|
|
723
|
|
724 aTxBuffer[0] = 0x70;
|
|
725 aTxBuffer[1] = 0x65;
|
|
726 send((uint8_t*)aTxBuffer, 2);
|
|
727 aTxBuffer[0] = 0x72;
|
|
728 aTxBuffer[1] = 0x1B;
|
|
729 send((uint8_t*)aTxBuffer, 2);
|
|
730
|
|
731 aTxBuffer[0] = 0x70;
|
|
732 aTxBuffer[1] = 0x66;
|
|
733 send((uint8_t*)aTxBuffer, 2);
|
|
734 aTxBuffer[0] = 0x72;
|
|
735 aTxBuffer[1] = 0x5C;
|
|
736 send((uint8_t*)aTxBuffer, 2);
|
|
737
|
|
738 brightness_screen1=4;
|
|
739 }
|
|
740 }
|
|
741
|
|
742 void display_1_brightness_high(void)
|
|
743 {
|
|
744 uint8_t aTxBuffer[3];
|
|
745 if (brightness_screen1 == 3)
|
|
746 {
|
|
747 // do nothing
|
|
748 }
|
|
749 else
|
|
750 {
|
|
751 // GAMMA L=200
|
871
|
752 aTxBuffer[0] = 0x70;
|
|
753 aTxBuffer[1] = 0x40;
|
|
754 send((uint8_t*)aTxBuffer, 2);
|
|
755 aTxBuffer[0] = 0x72;
|
|
756 aTxBuffer[1] = 0x00;
|
|
757 send((uint8_t*)aTxBuffer, 2);
|
|
758
|
|
759 aTxBuffer[0] = 0x70;
|
|
760 aTxBuffer[1] = 0x41;
|
|
761 send((uint8_t*)aTxBuffer, 2);
|
|
762 aTxBuffer[0] = 0x72;
|
|
763 aTxBuffer[1] = 0x3F;
|
|
764 send((uint8_t*)aTxBuffer, 2);
|
|
765
|
|
766 aTxBuffer[0] = 0x70;
|
|
767 aTxBuffer[1] = 0x42;
|
|
768 send((uint8_t*)aTxBuffer, 2);
|
|
769 aTxBuffer[0] = 0x72;
|
|
770 aTxBuffer[1] = 0x2A;
|
|
771 send((uint8_t*)aTxBuffer, 2);
|
|
772
|
|
773 aTxBuffer[0] = 0x70;
|
|
774 aTxBuffer[1] = 0x43;
|
|
775 send((uint8_t*)aTxBuffer, 2);
|
|
776 aTxBuffer[0] = 0x72;
|
|
777 aTxBuffer[1] = 0x27;
|
|
778 send((uint8_t*)aTxBuffer, 2);
|
|
779
|
|
780 aTxBuffer[0] = 0x70;
|
|
781 aTxBuffer[1] = 0x44;
|
|
782 send((uint8_t*)aTxBuffer, 2);
|
|
783 aTxBuffer[0] = 0x72;
|
|
784 aTxBuffer[1] = 0x27;
|
|
785 send((uint8_t*)aTxBuffer, 2);
|
|
786
|
|
787 aTxBuffer[0] = 0x70;
|
|
788 aTxBuffer[1] = 0x45;
|
|
789 send((uint8_t*)aTxBuffer, 2);
|
|
790 aTxBuffer[0] = 0x72;
|
|
791 aTxBuffer[1] = 0x1F;
|
|
792 send((uint8_t*)aTxBuffer, 2);
|
|
793
|
|
794 aTxBuffer[0] = 0x70;
|
|
795 aTxBuffer[1] = 0x46;
|
|
796 send((uint8_t*)aTxBuffer, 2);
|
|
797 aTxBuffer[0] = 0x72;
|
|
798 aTxBuffer[1] = 0x44;
|
|
799 send((uint8_t*)aTxBuffer, 2);
|
|
800
|
|
801 aTxBuffer[0] = 0x70;
|
|
802 aTxBuffer[1] = 0x50;
|
|
803 send((uint8_t*)aTxBuffer, 2);
|
|
804 aTxBuffer[0] = 0x72;
|
|
805 aTxBuffer[1] = 0x00;
|
|
806 send((uint8_t*)aTxBuffer, 2);
|
|
807
|
|
808 aTxBuffer[0] = 0x70;
|
|
809 aTxBuffer[1] = 0x51;
|
|
810 send((uint8_t*)aTxBuffer, 2);
|
|
811 aTxBuffer[0] = 0x72;
|
|
812 aTxBuffer[1] = 0x00;
|
|
813 send((uint8_t*)aTxBuffer, 2);
|
|
814
|
|
815 aTxBuffer[0] = 0x70;
|
|
816 aTxBuffer[1] = 0x52;
|
|
817 send((uint8_t*)aTxBuffer, 2);
|
|
818 aTxBuffer[0] = 0x72;
|
|
819 aTxBuffer[1] = 0x17;
|
|
820 send((uint8_t*)aTxBuffer, 2);
|
|
821
|
|
822 aTxBuffer[0] = 0x70;
|
|
823 aTxBuffer[1] = 0x53;
|
|
824 send((uint8_t*)aTxBuffer, 2);
|
|
825 aTxBuffer[0] = 0x72;
|
|
826 aTxBuffer[1] = 0x24;
|
|
827 send((uint8_t*)aTxBuffer, 2);
|
|
828
|
|
829 aTxBuffer[0] = 0x70;
|
|
830 aTxBuffer[1] = 0x54;
|
|
831 send((uint8_t*)aTxBuffer, 2);
|
|
832 aTxBuffer[0] = 0x72;
|
|
833 aTxBuffer[1] = 0x26;
|
|
834 send((uint8_t*)aTxBuffer, 2);
|
|
835
|
|
836 aTxBuffer[0] = 0x70;
|
|
837 aTxBuffer[1] = 0x55;
|
|
838 send((uint8_t*)aTxBuffer, 2);
|
|
839 aTxBuffer[0] = 0x72;
|
|
840 aTxBuffer[1] = 0x1F;
|
|
841 send((uint8_t*)aTxBuffer, 2);
|
|
842
|
|
843 aTxBuffer[0] = 0x70;
|
|
844 aTxBuffer[1] = 0x56;
|
|
845 send((uint8_t*)aTxBuffer, 2);
|
|
846 aTxBuffer[0] = 0x72;
|
|
847 aTxBuffer[1] = 0x43;
|
|
848 send((uint8_t*)aTxBuffer, 2);
|
|
849
|
|
850 aTxBuffer[0] = 0x70;
|
|
851 aTxBuffer[1] = 0x60;
|
|
852 send((uint8_t*)aTxBuffer, 2);
|
|
853 aTxBuffer[0] = 0x72;
|
|
854 aTxBuffer[1] = 0x00;
|
|
855 send((uint8_t*)aTxBuffer, 2);
|
|
856
|
|
857 aTxBuffer[0] = 0x70;
|
|
858 aTxBuffer[1] = 0x61;
|
|
859 send((uint8_t*)aTxBuffer, 2);
|
|
860 aTxBuffer[0] = 0x72;
|
|
861 aTxBuffer[1] = 0x3F;
|
|
862 send((uint8_t*)aTxBuffer, 2);
|
|
863
|
|
864 aTxBuffer[0] = 0x70;
|
|
865 aTxBuffer[1] = 0x62;
|
|
866 send((uint8_t*)aTxBuffer, 2);
|
|
867 aTxBuffer[0] = 0x72;
|
|
868 aTxBuffer[1] = 0x2A;
|
|
869 send((uint8_t*)aTxBuffer, 2);
|
|
870
|
|
871 aTxBuffer[0] = 0x70;
|
|
872 aTxBuffer[1] = 0x63;
|
|
873 send((uint8_t*)aTxBuffer, 2);
|
|
874 aTxBuffer[0] = 0x72;
|
|
875 aTxBuffer[1] = 0x25;
|
|
876 send((uint8_t*)aTxBuffer, 2);
|
|
877
|
|
878 aTxBuffer[0] = 0x70;
|
|
879 aTxBuffer[1] = 0x64;
|
|
880 send((uint8_t*)aTxBuffer, 2);
|
|
881 aTxBuffer[0] = 0x72;
|
|
882 aTxBuffer[1] = 0x24;
|
|
883 send((uint8_t*)aTxBuffer, 2);
|
|
884
|
|
885 aTxBuffer[0] = 0x70;
|
|
886 aTxBuffer[1] = 0x65;
|
|
887 send((uint8_t*)aTxBuffer, 2);
|
|
888 aTxBuffer[0] = 0x72;
|
|
889 aTxBuffer[1] = 0x1B;
|
|
890 send((uint8_t*)aTxBuffer, 2);
|
|
891
|
|
892 aTxBuffer[0] = 0x70;
|
|
893 aTxBuffer[1] = 0x66;
|
|
894 send((uint8_t*)aTxBuffer, 2);
|
|
895 aTxBuffer[0] = 0x72;
|
|
896 aTxBuffer[1] = 0x5C;
|
|
897 send((uint8_t*)aTxBuffer, 2);
|
|
898
|
878
|
899 brightness_screen1=3;
|
|
900 }
|
|
901 }
|
|
902
|
|
903
|
|
904 void display_1_brightness_std(void)
|
|
905 {
|
|
906 uint8_t aTxBuffer[3];
|
|
907
|
|
908 if (brightness_screen1 == 2)
|
|
909 {
|
|
910 // do nothing
|
|
911 }
|
|
912 else
|
|
913 {
|
871
|
914 // GAMMA L=150
|
|
915 aTxBuffer[0] = 0x70;
|
|
916 aTxBuffer[1] = 0x40;
|
|
917 send((uint8_t*)aTxBuffer, 2);
|
|
918 aTxBuffer[0] = 0x72;
|
|
919 aTxBuffer[1] = 0x00;
|
|
920 send((uint8_t*)aTxBuffer, 2);
|
|
921
|
|
922 aTxBuffer[0] = 0x70;
|
|
923 aTxBuffer[1] = 0x41;
|
|
924 send((uint8_t*)aTxBuffer, 2);
|
|
925 aTxBuffer[0] = 0x72;
|
|
926 aTxBuffer[1] = 0x3F;
|
|
927 send((uint8_t*)aTxBuffer, 2);
|
|
928
|
|
929 aTxBuffer[0] = 0x70;
|
|
930 aTxBuffer[1] = 0x42;
|
|
931 send((uint8_t*)aTxBuffer, 2);
|
|
932 aTxBuffer[0] = 0x72;
|
|
933 aTxBuffer[1] = 0x2D;
|
|
934 send((uint8_t*)aTxBuffer, 2);
|
|
935
|
|
936 aTxBuffer[0] = 0x70;
|
|
937 aTxBuffer[1] = 0x43;
|
|
938 send((uint8_t*)aTxBuffer, 2);
|
|
939 aTxBuffer[0] = 0x72;
|
|
940 aTxBuffer[1] = 0x29;
|
|
941 send((uint8_t*)aTxBuffer, 2);
|
|
942
|
|
943 aTxBuffer[0] = 0x70;
|
|
944 aTxBuffer[1] = 0x44;
|
|
945 send((uint8_t*)aTxBuffer, 2);
|
|
946 aTxBuffer[0] = 0x72;
|
|
947 aTxBuffer[1] = 0x28;
|
|
948 send((uint8_t*)aTxBuffer, 2);
|
|
949
|
|
950 aTxBuffer[0] = 0x70;
|
|
951 aTxBuffer[1] = 0x45;
|
|
952 send((uint8_t*)aTxBuffer, 2);
|
|
953 aTxBuffer[0] = 0x72;
|
|
954 aTxBuffer[1] = 0x23;
|
|
955 send((uint8_t*)aTxBuffer, 2);
|
|
956
|
|
957 aTxBuffer[0] = 0x70;
|
|
958 aTxBuffer[1] = 0x46;
|
|
959 send((uint8_t*)aTxBuffer, 2);
|
|
960 aTxBuffer[0] = 0x72;
|
|
961 aTxBuffer[1] = 0x37;
|
|
962 send((uint8_t*)aTxBuffer, 2);
|
|
963
|
|
964 aTxBuffer[0] = 0x70;
|
|
965 aTxBuffer[1] = 0x50;
|
|
966 send((uint8_t*)aTxBuffer, 2);
|
|
967 aTxBuffer[0] = 0x72;
|
|
968 aTxBuffer[1] = 0x00;
|
|
969 send((uint8_t*)aTxBuffer, 2);
|
|
970
|
|
971 aTxBuffer[0] = 0x70;
|
|
972 aTxBuffer[1] = 0x51;
|
|
973 send((uint8_t*)aTxBuffer, 2);
|
|
974 aTxBuffer[0] = 0x72;
|
|
975 aTxBuffer[1] = 0x00;
|
|
976 send((uint8_t*)aTxBuffer, 2);
|
|
977
|
|
978 aTxBuffer[0] = 0x70;
|
|
979 aTxBuffer[1] = 0x52;
|
|
980 send((uint8_t*)aTxBuffer, 2);
|
|
981 aTxBuffer[0] = 0x72;
|
|
982 aTxBuffer[1] = 0x0B;
|
|
983 send((uint8_t*)aTxBuffer, 2);
|
|
984
|
|
985 aTxBuffer[0] = 0x70;
|
|
986 aTxBuffer[1] = 0x53;
|
|
987 send((uint8_t*)aTxBuffer, 2);
|
|
988 aTxBuffer[0] = 0x72;
|
|
989 aTxBuffer[1] = 0x25;
|
|
990 send((uint8_t*)aTxBuffer, 2);
|
|
991
|
|
992 aTxBuffer[0] = 0x70;
|
|
993 aTxBuffer[1] = 0x54;
|
|
994 send((uint8_t*)aTxBuffer, 2);
|
|
995 aTxBuffer[0] = 0x72;
|
|
996 aTxBuffer[1] = 0x28;
|
|
997 send((uint8_t*)aTxBuffer, 2);
|
|
998
|
|
999 aTxBuffer[0] = 0x70;
|
|
1000 aTxBuffer[1] = 0x55;
|
|
1001 send((uint8_t*)aTxBuffer, 2);
|
|
1002 aTxBuffer[0] = 0x72;
|
|
1003 aTxBuffer[1] = 0x22;
|
|
1004 send((uint8_t*)aTxBuffer, 2);
|
|
1005
|
|
1006 aTxBuffer[0] = 0x70;
|
|
1007 aTxBuffer[1] = 0x56;
|
|
1008 send((uint8_t*)aTxBuffer, 2);
|
|
1009 aTxBuffer[0] = 0x72;
|
|
1010 aTxBuffer[1] = 0x36;
|
|
1011 send((uint8_t*)aTxBuffer, 2);
|
|
1012
|
|
1013 aTxBuffer[0] = 0x70;
|
|
1014 aTxBuffer[1] = 0x60;
|
|
1015 send((uint8_t*)aTxBuffer, 2);
|
|
1016 aTxBuffer[0] = 0x72;
|
|
1017 aTxBuffer[1] = 0x00;
|
|
1018 send((uint8_t*)aTxBuffer, 2);
|
|
1019
|
|
1020 aTxBuffer[0] = 0x70;
|
|
1021 aTxBuffer[1] = 0x61;
|
|
1022 send((uint8_t*)aTxBuffer, 2);
|
|
1023 aTxBuffer[0] = 0x72;
|
|
1024 aTxBuffer[1] = 0x3F;
|
|
1025 send((uint8_t*)aTxBuffer, 2);
|
|
1026
|
|
1027 aTxBuffer[0] = 0x70;
|
|
1028 aTxBuffer[1] = 0x62;
|
|
1029 send((uint8_t*)aTxBuffer, 2);
|
|
1030 aTxBuffer[0] = 0x72;
|
|
1031 aTxBuffer[1] = 0x2B;
|
|
1032 send((uint8_t*)aTxBuffer, 2);
|
|
1033
|
|
1034 aTxBuffer[0] = 0x70;
|
|
1035 aTxBuffer[1] = 0x63;
|
|
1036 send((uint8_t*)aTxBuffer, 2);
|
|
1037 aTxBuffer[0] = 0x72;
|
|
1038 aTxBuffer[1] = 0x28;
|
|
1039 send((uint8_t*)aTxBuffer, 2);
|
|
1040
|
|
1041 aTxBuffer[0] = 0x70;
|
|
1042 aTxBuffer[1] = 0x64;
|
|
1043 send((uint8_t*)aTxBuffer, 2);
|
|
1044 aTxBuffer[0] = 0x72;
|
|
1045 aTxBuffer[1] = 0x26;
|
|
1046 send((uint8_t*)aTxBuffer, 2);
|
|
1047
|
|
1048 aTxBuffer[0] = 0x70;
|
|
1049 aTxBuffer[1] = 0x65;
|
|
1050 send((uint8_t*)aTxBuffer, 2);
|
|
1051 aTxBuffer[0] = 0x72;
|
|
1052 aTxBuffer[1] = 0x1F;
|
|
1053 send((uint8_t*)aTxBuffer, 2);
|
|
1054
|
|
1055 aTxBuffer[0] = 0x70;
|
|
1056 aTxBuffer[1] = 0x66;
|
|
1057 send((uint8_t*)aTxBuffer, 2);
|
|
1058 aTxBuffer[0] = 0x72;
|
|
1059 aTxBuffer[1] = 0x4A;
|
|
1060 send((uint8_t*)aTxBuffer, 2);
|
878
|
1061
|
|
1062 brightness_screen1=2;
|
|
1063 }
|
|
1064 }
|
|
1065
|
|
1066 void display_1_brightness_eco(void)
|
|
1067 {
|
|
1068 uint8_t aTxBuffer[3];
|
|
1069
|
|
1070 if (brightness_screen1 == 1)
|
|
1071 {
|
|
1072 // do nothing
|
|
1073 }
|
|
1074 else
|
|
1075 {
|
|
1076 // GAMMA L=100
|
|
1077 aTxBuffer[0] = 0x70;
|
|
1078 aTxBuffer[1] = 0x40;
|
|
1079 send((uint8_t*)aTxBuffer, 2);
|
|
1080 aTxBuffer[0] = 0x72;
|
|
1081 aTxBuffer[1] = 0x00;
|
|
1082 send((uint8_t*)aTxBuffer, 2);
|
|
1083
|
|
1084 aTxBuffer[0] = 0x70;
|
|
1085 aTxBuffer[1] = 0x41;
|
|
1086 send((uint8_t*)aTxBuffer, 2);
|
|
1087 aTxBuffer[0] = 0x72;
|
|
1088 aTxBuffer[1] = 0x3F;
|
|
1089 send((uint8_t*)aTxBuffer, 2);
|
|
1090
|
|
1091 aTxBuffer[0] = 0x70;
|
|
1092 aTxBuffer[1] = 0x42;
|
|
1093 send((uint8_t*)aTxBuffer, 2);
|
|
1094 aTxBuffer[0] = 0x72;
|
|
1095 aTxBuffer[1] = 0x30;
|
|
1096 send((uint8_t*)aTxBuffer, 2);
|
|
1097
|
|
1098 aTxBuffer[0] = 0x70;
|
|
1099 aTxBuffer[1] = 0x43;
|
|
1100 send((uint8_t*)aTxBuffer, 2);
|
|
1101 aTxBuffer[0] = 0x72;
|
|
1102 aTxBuffer[1] = 0x2A;
|
|
1103 send((uint8_t*)aTxBuffer, 2);
|
|
1104
|
|
1105 aTxBuffer[0] = 0x70;
|
|
1106 aTxBuffer[1] = 0x44;
|
|
1107 send((uint8_t*)aTxBuffer, 2);
|
|
1108 aTxBuffer[0] = 0x72;
|
|
1109 aTxBuffer[1] = 0x2B;
|
|
1110 send((uint8_t*)aTxBuffer, 2);
|
|
1111
|
|
1112 aTxBuffer[0] = 0x70;
|
|
1113 aTxBuffer[1] = 0x45;
|
|
1114 send((uint8_t*)aTxBuffer, 2);
|
|
1115 aTxBuffer[0] = 0x72;
|
|
1116 aTxBuffer[1] = 0x24;
|
|
1117 send((uint8_t*)aTxBuffer, 2);
|
871
|
1118
|
|
1119 aTxBuffer[0] = 0x70;
|
878
|
1120 aTxBuffer[1] = 0x46;
|
|
1121 send((uint8_t*)aTxBuffer, 2);
|
|
1122 aTxBuffer[0] = 0x72;
|
|
1123 aTxBuffer[1] = 0x2F;
|
|
1124 send((uint8_t*)aTxBuffer, 2);
|
|
1125
|
|
1126 aTxBuffer[0] = 0x70;
|
|
1127 aTxBuffer[1] = 0x50;
|
|
1128 send((uint8_t*)aTxBuffer, 2);
|
|
1129 aTxBuffer[0] = 0x72;
|
|
1130 aTxBuffer[1] = 0x00;
|
|
1131 send((uint8_t*)aTxBuffer, 2);
|
|
1132
|
|
1133 aTxBuffer[0] = 0x70;
|
|
1134 aTxBuffer[1] = 0x51;
|
|
1135 send((uint8_t*)aTxBuffer, 2);
|
|
1136 aTxBuffer[0] = 0x72;
|
|
1137 aTxBuffer[1] = 0x00;
|
|
1138 send((uint8_t*)aTxBuffer, 2);
|
|
1139
|
|
1140 aTxBuffer[0] = 0x70;
|
|
1141 aTxBuffer[1] = 0x52;
|
871
|
1142 send((uint8_t*)aTxBuffer, 2);
|
|
1143 aTxBuffer[0] = 0x72;
|
878
|
1144 aTxBuffer[1] = 0x00;
|
|
1145 send((uint8_t*)aTxBuffer, 2);
|
|
1146
|
|
1147 aTxBuffer[0] = 0x70;
|
|
1148 aTxBuffer[1] = 0x53;
|
|
1149 send((uint8_t*)aTxBuffer, 2);
|
|
1150 aTxBuffer[0] = 0x72;
|
|
1151 aTxBuffer[1] = 0x25;
|
|
1152 send((uint8_t*)aTxBuffer, 2);
|
|
1153
|
|
1154 aTxBuffer[0] = 0x70;
|
|
1155 aTxBuffer[1] = 0x54;
|
|
1156 send((uint8_t*)aTxBuffer, 2);
|
|
1157 aTxBuffer[0] = 0x72;
|
|
1158 aTxBuffer[1] = 0x29;
|
|
1159 send((uint8_t*)aTxBuffer, 2);
|
|
1160
|
|
1161 aTxBuffer[0] = 0x70;
|
|
1162 aTxBuffer[1] = 0x55;
|
|
1163 send((uint8_t*)aTxBuffer, 2);
|
|
1164 aTxBuffer[0] = 0x72;
|
|
1165 aTxBuffer[1] = 0x24;
|
|
1166 send((uint8_t*)aTxBuffer, 2);
|
|
1167
|
|
1168 aTxBuffer[0] = 0x70;
|
|
1169 aTxBuffer[1] = 0x56;
|
|
1170 send((uint8_t*)aTxBuffer, 2);
|
|
1171 aTxBuffer[0] = 0x72;
|
|
1172 aTxBuffer[1] = 0x2E;
|
|
1173 send((uint8_t*)aTxBuffer, 2);
|
|
1174
|
|
1175 aTxBuffer[0] = 0x70;
|
|
1176 aTxBuffer[1] = 0x60;
|
|
1177 send((uint8_t*)aTxBuffer, 2);
|
|
1178 aTxBuffer[0] = 0x72;
|
|
1179 aTxBuffer[1] = 0x00;
|
871
|
1180 send((uint8_t*)aTxBuffer, 2);
|
|
1181
|
|
1182 aTxBuffer[0] = 0x70;
|
878
|
1183 aTxBuffer[1] = 0x61;
|
|
1184 send((uint8_t*)aTxBuffer, 2);
|
|
1185 aTxBuffer[0] = 0x72;
|
|
1186 aTxBuffer[1] = 0x3F;
|
|
1187 send((uint8_t*)aTxBuffer, 2);
|
|
1188
|
|
1189 aTxBuffer[0] = 0x70;
|
|
1190 aTxBuffer[1] = 0x62;
|
|
1191 send((uint8_t*)aTxBuffer, 2);
|
|
1192 aTxBuffer[0] = 0x72;
|
|
1193 aTxBuffer[1] = 0x2F;
|
|
1194 send((uint8_t*)aTxBuffer, 2);
|
|
1195
|
|
1196 aTxBuffer[0] = 0x70;
|
|
1197 aTxBuffer[1] = 0x63;
|
|
1198 send((uint8_t*)aTxBuffer, 2);
|
|
1199 aTxBuffer[0] = 0x72;
|
|
1200 aTxBuffer[1] = 0x29;
|
|
1201 send((uint8_t*)aTxBuffer, 2);
|
|
1202
|
|
1203 aTxBuffer[0] = 0x70;
|
|
1204 aTxBuffer[1] = 0x64;
|
|
1205 send((uint8_t*)aTxBuffer, 2);
|
|
1206 aTxBuffer[0] = 0x72;
|
|
1207 aTxBuffer[1] = 0x29;
|
|
1208 send((uint8_t*)aTxBuffer, 2);
|
|
1209
|
|
1210 aTxBuffer[0] = 0x70;
|
|
1211 aTxBuffer[1] = 0x65;
|
|
1212 send((uint8_t*)aTxBuffer, 2);
|
|
1213 aTxBuffer[0] = 0x72;
|
|
1214 aTxBuffer[1] = 0x21;
|
|
1215 send((uint8_t*)aTxBuffer, 2);
|
|
1216
|
|
1217 aTxBuffer[0] = 0x70;
|
|
1218 aTxBuffer[1] = 0x66;
|
|
1219 send((uint8_t*)aTxBuffer, 2);
|
|
1220 aTxBuffer[0] = 0x72;
|
|
1221 aTxBuffer[1] = 0x3F;
|
|
1222 send((uint8_t*)aTxBuffer, 2);
|
|
1223
|
|
1224 brightness_screen1=1;
|
|
1225 }
|
|
1226 }
|
|
1227
|
|
1228 void display_1_brightness_cave(void)
|
|
1229 {
|
|
1230 uint8_t aTxBuffer[3];
|
|
1231
|
|
1232 if (brightness_screen1 == 0)
|
|
1233 {
|
|
1234 // do nothing
|
|
1235 }
|
|
1236 else
|
|
1237 {
|
|
1238 // GAMMA L=50
|
|
1239 aTxBuffer[0] = 0x70;
|
|
1240 aTxBuffer[1] = 0x40;
|
|
1241 send((uint8_t*)aTxBuffer, 2);
|
|
1242 aTxBuffer[0] = 0x72;
|
|
1243 aTxBuffer[1] = 0x00;
|
|
1244 send((uint8_t*)aTxBuffer, 2);
|
|
1245
|
|
1246 aTxBuffer[0] = 0x70;
|
|
1247 aTxBuffer[1] = 0x41;
|
|
1248 send((uint8_t*)aTxBuffer, 2);
|
|
1249 aTxBuffer[0] = 0x72;
|
|
1250 aTxBuffer[1] = 0x3F;
|
|
1251 send((uint8_t*)aTxBuffer, 2);
|
|
1252
|
|
1253 aTxBuffer[0] = 0x70;
|
|
1254 aTxBuffer[1] = 0x42;
|
|
1255 send((uint8_t*)aTxBuffer, 2);
|
|
1256 aTxBuffer[0] = 0x72;
|
|
1257 aTxBuffer[1] = 0x3C;
|
|
1258 send((uint8_t*)aTxBuffer, 2);
|
|
1259
|
|
1260 aTxBuffer[0] = 0x70;
|
|
1261 aTxBuffer[1] = 0x43;
|
|
1262 send((uint8_t*)aTxBuffer, 2);
|
|
1263 aTxBuffer[0] = 0x72;
|
|
1264 aTxBuffer[1] = 0x2C;
|
|
1265 send((uint8_t*)aTxBuffer, 2);
|
|
1266
|
|
1267 aTxBuffer[0] = 0x70;
|
|
1268 aTxBuffer[1] = 0x44;
|
|
1269 send((uint8_t*)aTxBuffer, 2);
|
|
1270 aTxBuffer[0] = 0x72;
|
|
1271 aTxBuffer[1] = 0x2D;
|
|
1272 send((uint8_t*)aTxBuffer, 2);
|
|
1273
|
|
1274 aTxBuffer[0] = 0x70;
|
|
1275 aTxBuffer[1] = 0x45;
|
|
1276 send((uint8_t*)aTxBuffer, 2);
|
|
1277 aTxBuffer[0] = 0x72;
|
|
1278 aTxBuffer[1] = 0x27;
|
|
1279 send((uint8_t*)aTxBuffer, 2);
|
|
1280
|
|
1281 aTxBuffer[0] = 0x70;
|
|
1282 aTxBuffer[1] = 0x46;
|
|
1283 send((uint8_t*)aTxBuffer, 2);
|
|
1284 aTxBuffer[0] = 0x72;
|
|
1285 aTxBuffer[1] = 0x24;
|
|
1286 send((uint8_t*)aTxBuffer, 2);
|
|
1287
|
|
1288 aTxBuffer[0] = 0x70;
|
|
1289 aTxBuffer[1] = 0x50;
|
|
1290 send((uint8_t*)aTxBuffer, 2);
|
|
1291 aTxBuffer[0] = 0x72;
|
|
1292 aTxBuffer[1] = 0x00;
|
|
1293 send((uint8_t*)aTxBuffer, 2);
|
|
1294
|
|
1295 aTxBuffer[0] = 0x70;
|
|
1296 aTxBuffer[1] = 0x51;
|
|
1297 send((uint8_t*)aTxBuffer, 2);
|
|
1298 aTxBuffer[0] = 0x72;
|
|
1299 aTxBuffer[1] = 0x00;
|
|
1300 send((uint8_t*)aTxBuffer, 2);
|
|
1301
|
|
1302 aTxBuffer[0] = 0x70;
|
|
1303 aTxBuffer[1] = 0x52;
|
|
1304 send((uint8_t*)aTxBuffer, 2);
|
|
1305 aTxBuffer[0] = 0x72;
|
|
1306 aTxBuffer[1] = 0x00;
|
|
1307 send((uint8_t*)aTxBuffer, 2);
|
|
1308
|
|
1309 aTxBuffer[0] = 0x70;
|
|
1310 aTxBuffer[1] = 0x53;
|
871
|
1311 send((uint8_t*)aTxBuffer, 2);
|
|
1312 aTxBuffer[0] = 0x72;
|
|
1313 aTxBuffer[1] = 0x22;
|
|
1314 send((uint8_t*)aTxBuffer, 2);
|
|
1315
|
|
1316 aTxBuffer[0] = 0x70;
|
878
|
1317 aTxBuffer[1] = 0x54;
|
871
|
1318 send((uint8_t*)aTxBuffer, 2);
|
|
1319 aTxBuffer[0] = 0x72;
|
878
|
1320 aTxBuffer[1] = 0x2A;
|
871
|
1321 send((uint8_t*)aTxBuffer, 2);
|
|
1322
|
|
1323 aTxBuffer[0] = 0x70;
|
878
|
1324 aTxBuffer[1] = 0x55;
|
871
|
1325 send((uint8_t*)aTxBuffer, 2);
|
|
1326 aTxBuffer[0] = 0x72;
|
878
|
1327 aTxBuffer[1] = 0x27;
|
871
|
1328 send((uint8_t*)aTxBuffer, 2);
|
|
1329
|
|
1330 aTxBuffer[0] = 0x70;
|
878
|
1331 aTxBuffer[1] = 0x56;
|
871
|
1332 send((uint8_t*)aTxBuffer, 2);
|
|
1333 aTxBuffer[0] = 0x72;
|
878
|
1334 aTxBuffer[1] = 0x23;
|
871
|
1335 send((uint8_t*)aTxBuffer, 2);
|
|
1336
|
|
1337 aTxBuffer[0] = 0x70;
|
878
|
1338 aTxBuffer[1] = 0x60;
|
871
|
1339 send((uint8_t*)aTxBuffer, 2);
|
|
1340 aTxBuffer[0] = 0x72;
|
|
1341 aTxBuffer[1] = 0x00;
|
|
1342 send((uint8_t*)aTxBuffer, 2);
|
|
1343
|
|
1344 aTxBuffer[0] = 0x70;
|
878
|
1345 aTxBuffer[1] = 0x61;
|
871
|
1346 send((uint8_t*)aTxBuffer, 2);
|
|
1347 aTxBuffer[0] = 0x72;
|
878
|
1348 aTxBuffer[1] = 0x3F;
|
871
|
1349 send((uint8_t*)aTxBuffer, 2);
|
|
1350
|
878
|
1351 aTxBuffer[0] = 0x70;
|
|
1352 aTxBuffer[1] = 0x62;
|
|
1353 send((uint8_t*)aTxBuffer, 2);
|
|
1354 aTxBuffer[0] = 0x72;
|
|
1355 aTxBuffer[1] = 0x3B;
|
|
1356 send((uint8_t*)aTxBuffer, 2);
|
871
|
1357
|
|
1358 aTxBuffer[0] = 0x70;
|
878
|
1359 aTxBuffer[1] = 0x63;
|
871
|
1360 send((uint8_t*)aTxBuffer, 2);
|
|
1361 aTxBuffer[0] = 0x72;
|
878
|
1362 aTxBuffer[1] = 0x2C;
|
871
|
1363 send((uint8_t*)aTxBuffer, 2);
|
|
1364
|
|
1365 aTxBuffer[0] = 0x70;
|
878
|
1366 aTxBuffer[1] = 0x64;
|
871
|
1367 send((uint8_t*)aTxBuffer, 2);
|
|
1368 aTxBuffer[0] = 0x72;
|
878
|
1369 aTxBuffer[1] = 0x2B;
|
871
|
1370 send((uint8_t*)aTxBuffer, 2);
|
|
1371
|
878
|
1372 aTxBuffer[0] = 0x70;
|
|
1373 aTxBuffer[1] = 0x65;
|
|
1374 send((uint8_t*)aTxBuffer, 2);
|
|
1375 aTxBuffer[0] = 0x72;
|
|
1376 aTxBuffer[1] = 0x24;
|
|
1377 send((uint8_t*)aTxBuffer, 2);
|
871
|
1378
|
|
1379 aTxBuffer[0] = 0x70;
|
878
|
1380 aTxBuffer[1] = 0x66;
|
871
|
1381 send((uint8_t*)aTxBuffer, 2);
|
|
1382 aTxBuffer[0] = 0x72;
|
878
|
1383 aTxBuffer[1] = 0x31;
|
871
|
1384 send((uint8_t*)aTxBuffer, 2);
|
|
1385
|
878
|
1386 brightness_screen1=0;
|
|
1387 }
|
871
|
1388 }
|
|
1389
|
38
|
1390 static void Display_Error_Handler(void)
|
|
1391 {
|
871
|
1392 //while(1)
|
38
|
1393 {
|
|
1394 }
|
|
1395 }
|