Skip to content

Commit 50b8518

Browse files
authored
Merge pull request #59 from wtakuo/In_eSPI_patch
Quick fix for compilation errors in In_eSPI.{h,cpp}
2 parents 345a077 + 639904c commit 50b8518

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/utility/In_eSPI.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ uint16_t TFT_eSPI::readcommand16(uint8_t cmd_function, uint8_t index)
615615
{
616616
uint32_t reg;
617617

618-
reg |= (readcommand8(cmd_function, index + 0) << 8);
618+
reg = (readcommand8(cmd_function, index + 0) << 8);
619619
reg |= (readcommand8(cmd_function, index + 1) << 0);
620620

621621
return reg;
@@ -1196,7 +1196,7 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint8_t *
11961196
//else drawPixel((dw-len)+xp,h-dh,bitmap_bg);
11971197
xp++;
11981198
}
1199-
*ptr++;
1199+
ptr++;
12001200
len -= 8;
12011201
}
12021202

@@ -1345,7 +1345,7 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint8_t *
13451345
px++;
13461346
xp++;
13471347
}
1348-
*ptr++;
1348+
ptr++;
13491349
len -= 8;
13501350
}
13511351
if (np) pushColor(bitmap_fg, np);

src/utility/In_eSPI.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@
203203
#define set_mask(C) xset_mask[C] // 63fps Sprite rendering test 33% faster, graphicstest only 1.8% faster than shifting in real time
204204

205205
// Real-time shifting alternative to above to save 1KByte RAM, 47 fps Sprite rendering test
206-
//#define set_mask(C) ((C&0x80)>>7)<<TFT_D7 | ((C&0x40)>>6)<<TFT_D6 | ((C&0x20)>>5)<<TFT_D5 | ((C&0x10)>>4)<<TFT_D4 | \
207-
((C&0x08)>>3)<<TFT_D3 | ((C&0x04)>>2)<<TFT_D2 | ((C&0x02)>>1)<<TFT_D1 | ((C&0x01)>>0)<<TFT_D0
206+
/* #define set_mask(C) ((C&0x80)>>7)<<TFT_D7 | ((C&0x40)>>6)<<TFT_D6 | ((C&0x20)>>5)<<TFT_D5 | ((C&0x10)>>4)<<TFT_D4 | \
207+
((C&0x08)>>3)<<TFT_D3 | ((C&0x04)>>2)<<TFT_D2 | ((C&0x02)>>1)<<TFT_D1 | ((C&0x01)>>0)<<TFT_D0 */
208208

209209
// Write 8 bits to TFT
210210
#define tft_Write_8(C) GPIO.out_w1tc = clr_mask; GPIO.out_w1ts = set_mask((uint8_t)C); WR_H

0 commit comments

Comments
 (0)