mirror of https://github.com/arendst/Tasmota.git
st7789 support for LANBON_L8
This commit is contained in:
parent
76ff052ec6
commit
7014e64fed
|
@ -96,8 +96,11 @@ Arduino_ST7789::Arduino_ST7789(int8_t dc, int8_t rst, int8_t cs, int8_t bp)
|
|||
|
||||
void Arduino_ST7789::DisplayInit(int8_t p,int8_t size,int8_t rot,int8_t font) {
|
||||
setRotation(rot);
|
||||
//invertDisplay(false);
|
||||
invertDisplay(true);
|
||||
if (_width==320 || _height==320) {
|
||||
invertDisplay(false);
|
||||
} else {
|
||||
invertDisplay(true);
|
||||
}
|
||||
//setTextWrap(false); // Allow text to run off edges
|
||||
//cp437(true);
|
||||
setTextFont(font&3);
|
||||
|
|
|
@ -45,6 +45,10 @@
|
|||
|
||||
// currently fixed
|
||||
#define BACKPLANE_PIN 2
|
||||
#ifdef USE_LANBON_L8
|
||||
#undef BACKPLANE_PIN
|
||||
#define BACKPLANE_PIN 5
|
||||
#endif // USE_LANBON_L8
|
||||
|
||||
extern uint8_t *buffer;
|
||||
extern uint8_t color_type;
|
||||
|
@ -126,6 +130,12 @@ void ST7789_InitDriver(void) {
|
|||
// start digitizer with fixed adress and pins for esp32
|
||||
#define SDA_2 23
|
||||
#define SCL_2 32
|
||||
#ifdef USE_LANBON_L8
|
||||
#undef SDA_2
|
||||
#undef SCL_2
|
||||
#define SDA_2 4
|
||||
#define SCL_2 0
|
||||
#endif // USE_LANBON_L8
|
||||
Wire1.begin(SDA_2, SCL_2, 400000);
|
||||
Touch_Init(Wire1);
|
||||
#endif // USE_FT5206
|
||||
|
|
Loading…
Reference in New Issue