annotate Discovery/Src/display.c @ 871:f7318457df4d default

support for new screen ToDo: Brightness settings
author heinrichsweikamp
date Tue, 13 Aug 2024 13:24:54 +0200
parents 5ca177d2df5d
children e373e90a48db
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
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
46 #define OLED_STB_BY_OFF 0x1D // 00A0 + 300ms wait
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
47 #define OLED_DDISP_ON 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);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
52 static uint8_t receive_screen();
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 void display_power_on__1_of_2__pre_RGB(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 {
871
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
56 uint8_t aTxBuffer[3];
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
57 /* reset system */
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 HAL_GPIO_WritePin(DISPLAY_CSB_GPIO_PORT,DISPLAY_CSB_PIN,GPIO_PIN_SET); // chip select
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 HAL_GPIO_WritePin(DISPLAY_RESETB_GPIO_PORT,DISPLAY_RESETB_PIN,GPIO_PIN_RESET);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61 HAL_Delay(10);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62 HAL_GPIO_WritePin(DISPLAY_RESETB_GPIO_PORT,DISPLAY_RESETB_PIN,GPIO_PIN_SET);
871
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
63 HAL_Delay(25);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
64 // check for new screen
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
65 hardwareDisplay=0; // default is old screen
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
66 aTxBuffer[0] = 0x71; // Read internal register
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
67 if (receive_screen((uint8_t*)aTxBuffer) == 0x27) // chip Index (=0x27 for new screen)
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
68 {
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
69 hardwareDisplay=1;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
70 }
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 /* RGB signals should be now for 2 frames or more (datasheet) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75
300
5ca177d2df5d cleanup: remove commented/unused code, make static
Jan Mulder <jlmulder@xs4all.nl>
parents: 38
diff changeset
76 static void send(uint8_t *pData, uint16_t inputlength)
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78 HAL_GPIO_WritePin(DISPLAY_CSB_GPIO_PORT,DISPLAY_CSB_PIN,GPIO_PIN_RESET); // chip select
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80 if(HAL_SPI_Transmit(&hspiDisplay,(uint8_t*)pData, inputlength, 10000) != HAL_OK)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81 Display_Error_Handler();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 while (HAL_SPI_GetState(&hspiDisplay) != HAL_SPI_STATE_READY)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86 HAL_GPIO_WritePin(DISPLAY_CSB_GPIO_PORT,DISPLAY_CSB_PIN,GPIO_PIN_SET); // chip select
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88
871
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
89 static uint8_t receive_screen(uint8_t *pData)
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
90 {
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
91 uint8_t byte;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
92 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
93 if(HAL_SPI_Transmit(&hspiDisplay,(uint8_t*)pData, 1, 10000) != HAL_OK)
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
94 Display_Error_Handler();
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
95 while (HAL_SPI_GetState(&hspiDisplay) != HAL_SPI_STATE_READY)
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
96 {
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
97 }
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
98 if(HAL_SPI_Receive(&hspiDisplay, &byte, 1, 10000) != HAL_OK)
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
99 Display_Error_Handler();
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
100 while (HAL_SPI_GetState(&hspiDisplay) != HAL_SPI_STATE_READY)
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
101 {
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
102 }
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
103 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
104 return byte;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
105 }
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
106
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107
300
5ca177d2df5d cleanup: remove commented/unused code, make static
Jan Mulder <jlmulder@xs4all.nl>
parents: 38
diff changeset
108 static uint16_t convert8to9to8(uint8_t *pInput, uint8_t *pOutput,uint16_t inputlength)
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 uint16_t outputlength;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 uint8_t readbit = 0x80;//0b1000000;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112 uint8_t writebit = 0x40;//0b0100000;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113 uint16_t i,j,k;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 outputlength = ((inputlength+7)/8)*9;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117 for(i=0;i<outputlength;i++)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 pOutput[i] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 k = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 for(i=0;i<inputlength;i++)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123 if(i != 0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 pOutput[k] |= writebit; // 9. bit
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126 writebit = writebit >> 1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127 if(writebit == 0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129 writebit = 0x80;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 k++;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 for(j=0;j<8;j++)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 if((pInput[i] & readbit) != 0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 pOutput[k] |= writebit;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139 readbit = readbit >> 1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 if(readbit == 0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 readbit = 0x80;
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 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 return outputlength;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 void display_power_on__2_of_2__post_RGB(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 {
871
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
155 if (hardwareDisplay == 1)
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
156 {
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
157 display_power_on__2_of_2__post_RGB_display1();
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
158 }
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
159 else
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
160 {
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
161 display_power_on__2_of_2__post_RGB_display0();
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
162 }
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
163 }
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
164
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
165 void display_power_on__2_of_2__post_RGB_display0(void)
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
166 {
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
167
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 uint8_t aTxBuffer[32];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169 uint8_t bTxBuffer[36];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 uint16_t i,length;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172 for(i=0;i<32;i++)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173 aTxBuffer[i] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 for(i=0;i<36;i++)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175 bTxBuffer[i] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176
871
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
177 aTxBuffer[0] = TFT_ENABLE_EXTENDED_COMMANDS;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178 aTxBuffer[1] = 0xFF;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179 aTxBuffer[2] = 0x83;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180 aTxBuffer[3] = 0x63;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 send((uint8_t*)bTxBuffer, length);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183
871
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
184 aTxBuffer[0] = TFT_SET_POWER;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185 aTxBuffer[1] = 0x81;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 aTxBuffer[2] = 0x24;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 aTxBuffer[3] = 0x04;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188 aTxBuffer[4] = 0x02;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 aTxBuffer[5] = 0x02;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 aTxBuffer[6] = 0x03;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 aTxBuffer[7] = 0x10;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 aTxBuffer[8] = 0x10;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 aTxBuffer[9] = 0x34;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 aTxBuffer[10] = 0x3C;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195 aTxBuffer[11] = 0x3F;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 aTxBuffer[12] = 0x3F;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,13);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 send((uint8_t*)bTxBuffer, length);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199
871
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
200 aTxBuffer[0] = TFT_SLEEP_OUT;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,1);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 send((uint8_t*)bTxBuffer, length);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203 HAL_Delay(5+1);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204
871
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
205 aTxBuffer[0] = TFT_DISPLAY_INVERSION_OFF;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,1);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 send((uint8_t*)bTxBuffer, length);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208
871
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
209 aTxBuffer[0] = TFT_MEMORY_ACCESS_ONTROL;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210 aTxBuffer[1] = 0x00;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,2);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 send((uint8_t*)bTxBuffer, length);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213
871
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
214 aTxBuffer[0] = TFT_INTERFACE_PIXEL_FORMAT;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 aTxBuffer[1] = 0x70;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,2);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 send((uint8_t*)bTxBuffer, length);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 HAL_Delay(120+20);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219
871
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
220 aTxBuffer[0] = TFT_SET_POWER;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
221 aTxBuffer[1] = 0x78;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222 aTxBuffer[2] = 0x24;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223 aTxBuffer[3] = 0x04,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224 aTxBuffer[4] = 0x02;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225 aTxBuffer[5] = 0x02;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226 aTxBuffer[6] = 0x03;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227 aTxBuffer[7] = 0x10;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228 aTxBuffer[8] = 0x10;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229 aTxBuffer[9] = 0x34;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230 aTxBuffer[10] = 0x3C;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231 aTxBuffer[11] = 0x3F;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232 aTxBuffer[12] = 0x3F;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,13);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234 send((uint8_t*)bTxBuffer, length);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235
871
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
236 aTxBuffer[0] = TFT_SET_RGB_INTERFACE_RELATED;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237 aTxBuffer[1] = 0x01;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,2);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 send((uint8_t*)bTxBuffer, length);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240
871
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
241 aTxBuffer[0] = TFT_SET_DISPLAY_WAVEFORM;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242 aTxBuffer[1] = 0x00;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243 aTxBuffer[2] = 0x08;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244 aTxBuffer[3] = 0x56;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245 aTxBuffer[4] = 0x07;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246 aTxBuffer[5] = 0x01;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247 aTxBuffer[6] = 0x01;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248 aTxBuffer[7] = 0x4D;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249 aTxBuffer[8] = 0x01;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250 aTxBuffer[9] = 0x42;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
251 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,10);
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_SET_PANEL;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
255 aTxBuffer[1] = 0x0B;
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_SET_GAMMA_CURVE_RELATED;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260 aTxBuffer[1] = 0x01;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261 aTxBuffer[2] = 0x48;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262 aTxBuffer[3] = 0x4D;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 aTxBuffer[4] = 0x4E;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264 aTxBuffer[5] = 0x58;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265 aTxBuffer[6] = 0xF6;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266 aTxBuffer[7] = 0x0B;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267 aTxBuffer[8] = 0x4E;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268 aTxBuffer[9] = 0x12;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269 aTxBuffer[10] = 0xD5;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270 aTxBuffer[11] = 0x15;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271 aTxBuffer[12] = 0x95;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 aTxBuffer[13] = 0x55;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273 aTxBuffer[14] = 0x8E;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274 aTxBuffer[15] = 0x11;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275 aTxBuffer[16] = 0x01;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276 aTxBuffer[17] = 0x48;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277 aTxBuffer[18] = 0x4D;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278 aTxBuffer[19] = 0x55;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279 aTxBuffer[20] = 0x5F;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280 aTxBuffer[21] = 0xFD;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281 aTxBuffer[22] = 0x0A;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
282 aTxBuffer[23] = 0x4E;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
283 aTxBuffer[24] = 0x51;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
284 aTxBuffer[25] = 0xD3;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
285 aTxBuffer[26] = 0x17;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
286 aTxBuffer[27] = 0x95;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
287 aTxBuffer[28] = 0x96;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
288 aTxBuffer[29] = 0x4E;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
289 aTxBuffer[30] = 0x11;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
290 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,31);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
291 send((uint8_t*)bTxBuffer, length);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
292 HAL_Delay(5+1);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
293
871
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
294 aTxBuffer[0] = TFT_DISPLAY_ON;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
295 length = convert8to9to8((uint8_t*)aTxBuffer,(uint8_t*)bTxBuffer,1);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
296 send((uint8_t*)bTxBuffer, length);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
297 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
298
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
299
871
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
300 void display_power_on__2_of_2__post_RGB_display1(void)
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
301 {
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
302 uint8_t aTxBuffer[3];
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
303
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
304 aTxBuffer[0] = 0x71; // Read chip Index & revision number
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
305 aTxBuffer[1] = 0x00; // Dummy write - reads out 0x27
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
306 aTxBuffer[1] = 0x00; // Dummy write - reads out 0x96
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
307 send((uint8_t*)aTxBuffer, 3);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
308
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
309 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
310 aTxBuffer[1] = OLED_OSCILLATOR;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
311 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
312 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
313 aTxBuffer[1] = 0xA4;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
314 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
315
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
316 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
317 aTxBuffer[1] = OLED_SCTE_SET_31h;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
318 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
319 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
320 aTxBuffer[1] = 0x08;//8
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
321 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
322
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
323 //debug read
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
324 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
325 aTxBuffer[1] = OLED_SCTE_SET_31h;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
326 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
327 aTxBuffer[0] = 0x73; // Read internal register
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
328 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
329 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
330
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
331 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
332 aTxBuffer[1] = OLED_WCWE_SET_32h;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
333 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
334 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
335 aTxBuffer[1] = 0x14;//14
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
336 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
337
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
338 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
339 aTxBuffer[1] = OLED_GATELESS1_30h;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
340 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
341 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
342 aTxBuffer[1] = 0x02;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
343 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
344
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
345 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
346 aTxBuffer[1] = OLED_GATELESS2_27h;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
347 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
348 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
349 aTxBuffer[1] = 0x01;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
350 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
351
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
352
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
353 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
354 aTxBuffer[1] = OLED_VBP_SET_12h;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
355 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
356 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
357 aTxBuffer[1] = 0x08;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
358 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
359
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
360 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
361 aTxBuffer[1] = OLED_VFP_SET_13h;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
362 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
363 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
364 aTxBuffer[1] = 0x08;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
365 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
366
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
367 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
368 aTxBuffer[1] = OLED_DISPLAY_CON_15h;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
369 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
370 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
371 aTxBuffer[1] = 0x01; //SS=0
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
372 //aTxBuffer[1] = 0x11; //SS=1
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
373 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
374
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
375 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
376 aTxBuffer[1] = OLED_COLOR_DEPTH_SET_16h;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
377 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
378 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
379 aTxBuffer[1] = 0x00;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
380 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
381
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
382 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
383 aTxBuffer[1] = OLED_PENTILE_KEY_EFh; // write-only register...
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
384 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
385 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
386 aTxBuffer[1] = 0xD0;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
387 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
388 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
389 aTxBuffer[1] = 0xE8;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
390 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
391
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
392 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
393 aTxBuffer[1] = OLED_PENTILE1_A0h; // write-only register...
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
394 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
395 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
396 aTxBuffer[1] = 0x00;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
397 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
398 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
399 aTxBuffer[1] = 0x63;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
400 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
401
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
402 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
403 aTxBuffer[1] = OLED_PENTILE2_A1h; // write-only register...
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 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
406 aTxBuffer[1] = 0x00;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
407 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
408 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
409 aTxBuffer[1] = 0xC0; // SID1&SID0=00
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
410 // aTxBuffer[1] = 0xC4; // SID1&SID0=01 CC C8 C4 C0
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_PENTILE3_A2h; // write-only register...
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] = 0x00;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
418 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
419 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
420 aTxBuffer[1] = 0x32;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
421 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
422
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
423 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
424 aTxBuffer[1] = OLED_PENTILE4_A3h; // write-only register...
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
425 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
426 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
427 aTxBuffer[1] = 0x00;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
428 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
429 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
430 aTxBuffer[1] = 0x02;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
431 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
432
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
433 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
434 aTxBuffer[1] = OLED_BRIGHTNESS_CTRL_39h;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
435 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
436 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
437 aTxBuffer[1] = 0x44;//44
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
438 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
439
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
440 // GAMMA L=250
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
441 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
442 aTxBuffer[1] = 0x40;
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] = 0x00;
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] = 0x41;
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] = 0x3F;
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
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
455 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
456 aTxBuffer[1] = 0x42;
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 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
459 aTxBuffer[1] = 0x2A;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
460 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
461
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
462 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
463 aTxBuffer[1] = 0x43;
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] = 0x27;
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] = 0x44;
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] = 0x27;
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
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
476 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
477 aTxBuffer[1] = 0x45;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
478 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
479 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
480 aTxBuffer[1] = 0x1F;
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
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
483 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
484 aTxBuffer[1] = 0x46;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
485 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
486 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
487 aTxBuffer[1] = 0x44;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
488 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
489
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
490 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
491 aTxBuffer[1] = 0x50;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
492 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
493 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
494 aTxBuffer[1] = 0x00;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
495 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
496
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
497 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
498 aTxBuffer[1] = 0x51;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
499 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
500 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
501 aTxBuffer[1] = 0x00;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
502 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
503
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
504 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
505 aTxBuffer[1] = 0x52;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
506 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
507 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
508 aTxBuffer[1] = 0x17;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
509 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
510
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
511 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
512 aTxBuffer[1] = 0x53;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
513 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
514 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
515 aTxBuffer[1] = 0x24;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
516 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
517
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
518 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
519 aTxBuffer[1] = 0x54;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
520 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
521 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
522 aTxBuffer[1] = 0x26;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
523 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
524
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
525 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
526 aTxBuffer[1] = 0x55;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
527 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
528 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
529 aTxBuffer[1] = 0x1F;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
530 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
531
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
532 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
533 aTxBuffer[1] = 0x56;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
534 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
535 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
536 aTxBuffer[1] = 0x43;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
537 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
538
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
539 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
540 aTxBuffer[1] = 0x60;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
541 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
542 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
543 aTxBuffer[1] = 0x00;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
544 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
545
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
546 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
547 aTxBuffer[1] = 0x61;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
548 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
549 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
550 aTxBuffer[1] = 0x3F;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
551 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
552
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
553 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
554 aTxBuffer[1] = 0x62;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
555 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
556 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
557 aTxBuffer[1] = 0x2A;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
558 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
559
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
560 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
561 aTxBuffer[1] = 0x63;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
562 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
563 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
564 aTxBuffer[1] = 0x25;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
565 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
566
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
567 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
568 aTxBuffer[1] = 0x64;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
569 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
570 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
571 aTxBuffer[1] = 0x24;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
572 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
573
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
574 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
575 aTxBuffer[1] = 0x65;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
576 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
577 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
578 aTxBuffer[1] = 0x1B;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
579 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
580
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
581 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
582 aTxBuffer[1] = 0x66;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
583 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
584 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
585 aTxBuffer[1] = 0x5C;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
586 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
587
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
588 /*
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
589 // GAMMA L=150
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
590 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
591 aTxBuffer[1] = 0x40;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
592 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
593 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
594 aTxBuffer[1] = 0x00;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
595 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
596
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
597 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
598 aTxBuffer[1] = 0x41;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
599 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
600 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
601 aTxBuffer[1] = 0x3F;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
602 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
603
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
604 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
605 aTxBuffer[1] = 0x42;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
606 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
607 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
608 aTxBuffer[1] = 0x2D;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
609 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
610
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
611 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
612 aTxBuffer[1] = 0x43;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
613 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
614 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
615 aTxBuffer[1] = 0x29;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
616 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
617
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
618 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
619 aTxBuffer[1] = 0x44;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
620 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
621 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
622 aTxBuffer[1] = 0x28;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
623 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
624
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
625 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
626 aTxBuffer[1] = 0x45;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
627 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
628 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
629 aTxBuffer[1] = 0x23;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
630 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
631
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
632 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
633 aTxBuffer[1] = 0x46;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
634 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
635 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
636 aTxBuffer[1] = 0x37;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
637 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
638
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
639 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
640 aTxBuffer[1] = 0x50;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
641 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
642 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
643 aTxBuffer[1] = 0x00;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
644 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
645
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
646 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
647 aTxBuffer[1] = 0x51;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
648 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
649 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
650 aTxBuffer[1] = 0x00;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
651 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
652
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
653 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
654 aTxBuffer[1] = 0x52;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
655 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
656 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
657 aTxBuffer[1] = 0x0B;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
658 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
659
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
660 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
661 aTxBuffer[1] = 0x53;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
662 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
663 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
664 aTxBuffer[1] = 0x25;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
665 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
666
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
667 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
668 aTxBuffer[1] = 0x54;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
669 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
670 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
671 aTxBuffer[1] = 0x28;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
672 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
673
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
674 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
675 aTxBuffer[1] = 0x55;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
676 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
677 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
678 aTxBuffer[1] = 0x22;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
679 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
680
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
681 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
682 aTxBuffer[1] = 0x56;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
683 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
684 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
685 aTxBuffer[1] = 0x36;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
686 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
687
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
688 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
689 aTxBuffer[1] = 0x60;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
690 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
691 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
692 aTxBuffer[1] = 0x00;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
693 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
694
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
695 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
696 aTxBuffer[1] = 0x61;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
697 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
698 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
699 aTxBuffer[1] = 0x3F;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
700 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
701
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
702 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
703 aTxBuffer[1] = 0x62;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
704 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
705 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
706 aTxBuffer[1] = 0x2B;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
707 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
708
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
709 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
710 aTxBuffer[1] = 0x63;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
711 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
712 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
713 aTxBuffer[1] = 0x28;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
714 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
715
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
716 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
717 aTxBuffer[1] = 0x64;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
718 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
719 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
720 aTxBuffer[1] = 0x26;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
721 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
722
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
723 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
724 aTxBuffer[1] = 0x65;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
725 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
726 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
727 aTxBuffer[1] = 0x1F;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
728 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
729
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
730 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
731 aTxBuffer[1] = 0x66;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
732 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
733 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
734 aTxBuffer[1] = 0x4A;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
735 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
736 */
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
737
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
738 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
739 aTxBuffer[1] = OLED_BOOSTING_FREQ;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
740 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
741 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
742 aTxBuffer[1] = 0x22;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
743 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
744
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
745 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
746 aTxBuffer[1] = OLED_AMP_SET_18h;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
747 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
748 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
749 aTxBuffer[1] = 0x22;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
750 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
751
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] = OLED_GAMMA_AMP_19h;
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] = 0x02;
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] = OLED_POWER_CONTROL2_1Ah;
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] = 0x00;
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 /*
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
767 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
768 aTxBuffer[1] = OLED_POWER_CONTROL2_1Bh;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
769 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
770 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
771 aTxBuffer[1] = 0x4B;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
772 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
773
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
774 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
775 aTxBuffer[1] = OLED_POWER_CONTROL2_1Ch;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
776 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
777 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
778 aTxBuffer[1] = 0x05;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
779 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
780 */
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
781
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
782 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
783 aTxBuffer[1] = OLED_INTERNAL_LOGIC_VOLTAGE;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
784 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
785 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
786 aTxBuffer[1] = 0xA2;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
787 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
788
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
789 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
790 aTxBuffer[1] = OLED_POWER_SET;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
791 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
792 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
793 aTxBuffer[1] = 0x00;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
794 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
795
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
796 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
797 aTxBuffer[1] = OLED_POWER_SET2;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
798 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
799 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
800 aTxBuffer[1] = 0x77;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
801 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
802
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
803
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
804 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
805 aTxBuffer[1] = OLED_DISPLAY_CONDITION_SET_26h;
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 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
808 aTxBuffer[1] = 0xA0;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
809 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
810
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
811 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
812 aTxBuffer[1] = OLED_STB_BY_OFF;
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 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
815 aTxBuffer[1] = 0xA0;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
816 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
817
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
818 HAL_Delay(250);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
819
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
820 aTxBuffer[0] = 0x70;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
821 aTxBuffer[1] = OLED_DDISP_ON;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
822 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
823 aTxBuffer[0] = 0x72;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
824 aTxBuffer[1] = 0x03;
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
825 send((uint8_t*)aTxBuffer, 2);
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
826
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
827 }
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
828
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
829 static void Display_Error_Handler(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
830 {
871
f7318457df4d support for new screen
heinrichsweikamp
parents: 300
diff changeset
831 //while(1)
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
832 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
833 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
834 }