I think you are right with regards to how the library interfaces with the SPI pin. The EPD ThinkInk library transitioned to using the Adafruit_BusIO library for SPI, which handles most of the IO transactions. I’ve traced the declaration path for my particular display, hopefully someone will see something that I missed.
main.ino
// 2.9" Grayscale Featherwing or Breakout:
ThinkInk_290_Grayscale4_T5 display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);
ThinkInk_290_Grayscale4_T5.h
ThinkInk_290_Grayscale4_T5(int8_t DC, int8_t RST, int8_t CS, int8_t SRCS,
int8_t BUSY = -1, SPIClass *spi = &SPI)
: Adafruit_IL0373(296, 128, DC, RST, CS, SRCS, BUSY, spi){};
Adafruit_IL0373.cpp
Adafruit_IL0373::Adafruit_IL0373(int width, int height, int8_t DC, int8_t RST,
int8_t CS, int8_t SRCS, int8_t BUSY,
SPIClass *spi)
: Adafruit_EPD(width, height, DC, RST, CS, SRCS, BUSY, spi) {
buffer1_size = ((uint32_t)width * (uint32_t)height) / 8;
buffer2_size = buffer1_size;
if (SRCS >= 0) {
use_sram = true;
buffer1_addr = 0;
buffer2_addr = buffer1_size;
buffer1 = buffer2 = NULL;
} else {
buffer1 = (uint8_t *)malloc(buffer1_size);
buffer2 = (uint8_t *)malloc(buffer2_size);
}
}
Adafruit_EPD.cpp
Adafruit_EPD::Adafruit_EPD(int width, int height, int8_t DC, int8_t RST,
int8_t CS, int8_t SRCS, int8_t BUSY, SPIClass *spi)
: Adafruit_GFX(width, height), sram(SRCS) {
_cs_pin = CS;
_reset_pin = RST;
_dc_pin = DC;
_busy_pin = BUSY;
if (SRCS >= 0) {
use_sram = true;
} else {
use_sram = false;
}
spi_dev = new Adafruit_SPIDevice(CS,
4000000, // frequency
SPI_BITORDER_MSBFIRST, // bit order
SPI_MODE0, // data mode
spi);
singleByteTxns = false;
buffer1_size = buffer2_size = 0;
buffer1_addr = buffer2_addr = 0;
colorbuffer_addr = blackbuffer_addr = 0;
buffer1 = buffer2 = color_buffer = black_buffer = NULL;
}
At that last part there spi_dev = new Adafruit_SPIDevice();
that is the only declaration related to SPI that I can find within the scope of the project.
Also, does anyone know of a way to help narrow down what portion of this library is failing communication wise? Thanks.