annotate Discovery/Src/display.c @ 900:6a7701f66b16 Evo_2_23

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