Format and code tidy - fixes for compatibility issues
This commit is contained in:
1 parent
e65f4cb1fe
commit
d31cbc3dbd
18 files changed
+378
-465
No files matched your search
+13
-13
@@ -11,14 +11,14 @@
|
||||
static const uint8_t PROGMEM
|
||||
Bcmd[] = { // Initialization commands for 7735B screens
|
||||
18, // 18 commands in list:
|
||||
ST7735_SWRESET, DELAY, // 1: Software reset, no args, w/delay
|
||||
ST7735_SWRESET, TFT_INIT_DELAY, // 1: Software reset, no args, w/delay
|
||||
50, // 50 ms delay
|
||||
ST7735_SLPOUT , DELAY, // 2: Out of sleep mode, no args, w/delay
|
||||
ST7735_SLPOUT , TFT_INIT_DELAY, // 2: Out of sleep mode, no args, w/delay
|
||||
255, // 255 = 500 ms delay
|
||||
ST7735_COLMOD , 1+DELAY, // 3: Set color mode, 1 arg + delay:
|
||||
ST7735_COLMOD , 1+TFT_INIT_DELAY, // 3: Set color mode, 1 arg + delay:
|
||||
0x05, // 16-bit color
|
||||
10, // 10 ms delay
|
||||
ST7735_FRMCTR1, 3+DELAY, // 4: Frame rate control, 3 args + delay:
|
||||
ST7735_FRMCTR1, 3+TFT_INIT_DELAY, // 4: Frame rate control, 3 args + delay:
|
||||
0x00, // fastest refresh
|
||||
0x06, // 6 lines front porch
|
||||
0x03, // 3 lines back porch
|
||||
@@ -31,7 +31,7 @@
|
||||
0x02, // Fix on VTL
|
||||
ST7735_INVCTR , 1 , // 7: Display inversion control, 1 arg:
|
||||
0x0, // Line inversion
|
||||
ST7735_PWCTR1 , 2+DELAY, // 8: Power control, 2 args + delay:
|
||||
ST7735_PWCTR1 , 2+TFT_INIT_DELAY, // 8: Power control, 2 args + delay:
|
||||
0x02, // GVDD = 4.7V
|
||||
0x70, // 1.0uA
|
||||
10, // 10 ms delay
|
||||
@@ -40,7 +40,7 @@
|
||||
ST7735_PWCTR3 , 2 , // 10: Power control, 2 args, no delay:
|
||||
0x01, // Opamp current small
|
||||
0x02, // Boost frequency
|
||||
ST7735_VMCTR1 , 2+DELAY, // 11: Power control, 2 args + delay:
|
||||
ST7735_VMCTR1 , 2+TFT_INIT_DELAY, // 11: Power control, 2 args + delay:
|
||||
0x3C, // VCOMH = 4V
|
||||
0x38, // VCOML = -1.1V
|
||||
10, // 10 ms delay
|
||||
@@ -51,7 +51,7 @@
|
||||
0x21, 0x1B, 0x13, 0x19, // these config values represent)
|
||||
0x17, 0x15, 0x1E, 0x2B,
|
||||
0x04, 0x05, 0x02, 0x0E,
|
||||
ST7735_GMCTRN1,16+DELAY, // 14: Sparkles and rainbows, 16 args + delay:
|
||||
ST7735_GMCTRN1,16+TFT_INIT_DELAY, // 14: Sparkles and rainbows, 16 args + delay:
|
||||
0x0B, 0x14, 0x08, 0x1E, // (ditto)
|
||||
0x22, 0x1D, 0x18, 0x1E,
|
||||
0x1B, 0x1A, 0x24, 0x2B,
|
||||
@@ -63,16 +63,16 @@
|
||||
ST7735_RASET , 4 , // 16: Row addr set, 4 args, no delay:
|
||||
0x00, 0x02, // XSTART = 1
|
||||
0x00, 0x81, // XEND = 160
|
||||
ST7735_NORON , DELAY, // 17: Normal display on, no args, w/delay
|
||||
ST7735_NORON , TFT_INIT_DELAY, // 17: Normal display on, no args, w/delay
|
||||
10, // 10 ms delay
|
||||
ST7735_DISPON , DELAY, // 18: Main screen turn on, no args, w/delay
|
||||
ST7735_DISPON , TFT_INIT_DELAY, // 18: Main screen turn on, no args, w/delay
|
||||
255 }, // 255 = 500 ms delay
|
||||
|
||||
Rcmd1[] = { // Init for 7735R, part 1 (red or green tab)
|
||||
15, // 15 commands in list:
|
||||
ST7735_SWRESET, DELAY, // 1: Software reset, 0 args, w/delay
|
||||
ST7735_SWRESET, TFT_INIT_DELAY, // 1: Software reset, 0 args, w/delay
|
||||
150, // 150 ms delay
|
||||
ST7735_SLPOUT , DELAY, // 2: Out of sleep mode, 0 args, w/delay
|
||||
ST7735_SLPOUT , TFT_INIT_DELAY, // 2: Out of sleep mode, 0 args, w/delay
|
||||
255, // 500 ms delay
|
||||
ST7735_FRMCTR1, 3 , // 3: Frame rate ctrl - normal mode, 3 args:
|
||||
0x01, 0x2C, 0x2D, // Rate = fosc/(1x2+40) * (LINE+2C+2D)
|
||||
@@ -135,9 +135,9 @@
|
||||
0x2E, 0x2C, 0x29, 0x2D,
|
||||
0x2E, 0x2E, 0x37, 0x3F,
|
||||
0x00, 0x00, 0x02, 0x10,
|
||||
ST7735_NORON , DELAY, // 3: Normal display on, no args, w/delay
|
||||
ST7735_NORON , TFT_INIT_DELAY, // 3: Normal display on, no args, w/delay
|
||||
10, // 10 ms delay
|
||||
ST7735_DISPON , DELAY, // 4: Main screen turn on, no args w/delay
|
||||
ST7735_DISPON , TFT_INIT_DELAY, // 4: Main screen turn on, no args w/delay
|
||||
100 }; // 100 ms delay
|
||||
|
||||
tabcolor = TAB_COLOUR;
|
||||
|
||||
Reference in new issue
Block a user