Update xdsp_09_SSD1351.ino

This commit is contained in:
gemu2015 2021-02-28 17:08:43 +01:00
parent ed5dcbe616
commit 94ab68aed0
1 changed files with 2 additions and 13 deletions

View File

@ -59,23 +59,12 @@ void SSD1351_InitDriver() {
fg_color = SSD1351_WHITE;
bg_color = SSD1351_BLACK;
#ifdef SSD1351_DC
int8_t dcpin = SSD1351_DC;
#else
int8_t dcpin = -1;
#endif
if (PinUsed(GPIO_SSD1351_DC)) {
dcpin = Pin(GPIO_SSD1351_DC);
}
// init renderer
if (TasmotaGlobal.soft_spi_enabled){
ssd1351 = new SSD1351(Pin(GPIO_SSD1351_CS), Pin(GPIO_SSPI_MOSI), Pin(GPIO_SSPI_SCLK), dcpin);
ssd1351 = new SSD1351(Pin(GPIO_SSD1351_CS), Pin(GPIO_SSPI_MOSI), Pin(GPIO_SSPI_SCLK), Pin(GPIO_SSD1351_DC));
}
else if (TasmotaGlobal.spi_enabled) {
ssd1351 = new SSD1351(Pin(GPIO_SSD1351_CS), Pin(GPIO_SPI_MOSI), Pin(GPIO_SPI_CLK), dcpin);
ssd1351 = new SSD1351(Pin(GPIO_SSD1351_CS), Pin(GPIO_SPI_MOSI), Pin(GPIO_SPI_CLK), Pin(GPIO_SSD1351_DC));
}
delay(100);