mirror of https://github.com/arendst/Tasmota.git
fix epaper driver for esp32
This commit is contained in:
parent
aadfff1c0b
commit
9be73adb66
|
@ -364,8 +364,12 @@ const unsigned char lut_partial_update[] =
|
|||
#define PIN_OUT_SET 0x60000304
|
||||
#define PIN_OUT_CLEAR 0x60000308
|
||||
|
||||
#define PWRITE xdigitalWrite
|
||||
|
||||
#ifdef ESP32
|
||||
#define SSPI_USEANYPIN 1
|
||||
#define PWRITE digitalWrite
|
||||
#else
|
||||
#define PWRITE ydigitalWrite
|
||||
#endif
|
||||
|
||||
#ifndef SSPI_USEANYPIN
|
||||
// uses about 2.75 usecs, 365 kb /sec
|
||||
|
@ -388,6 +392,7 @@ void ICACHE_RAM_ATTR Epd::fastSPIwrite(uint8_t d,uint8_t dc) {
|
|||
}
|
||||
#else
|
||||
|
||||
#ifndef ESP32
|
||||
extern void ICACHE_RAM_ATTR xdigitalWrite(uint8_t pin, uint8_t val) {
|
||||
//stopWaveform(pin);
|
||||
if(pin < 16){
|
||||
|
@ -398,6 +403,7 @@ extern void ICACHE_RAM_ATTR xdigitalWrite(uint8_t pin, uint8_t val) {
|
|||
else GP16O &= ~1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// about 13 us => 76 kb / sec
|
||||
// can use any pin
|
||||
|
|
|
@ -502,12 +502,15 @@ const unsigned char lut_wb_quick[] PROGMEM =
|
|||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define PIN_OUT_SET 0x60000304
|
||||
#define PIN_OUT_CLEAR 0x60000308
|
||||
|
||||
#ifdef ESP32
|
||||
#define SSPI_USEANYPIN 1
|
||||
#define PWRITE digitalWrite
|
||||
#else
|
||||
#define PWRITE ydigitalWrite
|
||||
#endif
|
||||
|
||||
#ifndef SSPI_USEANYPIN
|
||||
// uses about 2.75 usecs, 365 kb /sec
|
||||
|
@ -530,6 +533,7 @@ void ICACHE_RAM_ATTR Epd42::fastSPIwrite(uint8_t d,uint8_t dc) {
|
|||
}
|
||||
#else
|
||||
|
||||
#ifndef ESP32
|
||||
extern void ICACHE_RAM_ATTR ydigitalWrite(uint8_t pin, uint8_t val) {
|
||||
//stopWaveform(pin);
|
||||
if(pin < 16){
|
||||
|
@ -540,6 +544,7 @@ extern void ICACHE_RAM_ATTR ydigitalWrite(uint8_t pin, uint8_t val) {
|
|||
else GP16O &= ~1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// about 13 us => 76 kb / sec
|
||||
// can use any pin
|
||||
void Epd42::fastSPIwrite(uint8_t d,uint8_t dc) {
|
||||
|
|
Loading…
Reference in New Issue