I using two ILI9488 display wia two hardware SPI connections on a Teensy 4.1. Creating two instances (one for each display) fails when providing the first display constructor with #define'd pins numbers, but fails for the second display. It will succeed if I provide the constructor with actual variables.
Can anyone provide a clue as to why this would be happening? I've provided a simple source example below. Uncommand any one of the three lines for "second display" to see the results after a compile.
Can anyone provide a clue as to why this would be happening? I've provided a simple source example below. Uncommand any one of the three lines for "second display" to see the results after a compile.
C++:
#include "ILI9488_t3.h"
#include "ILI9488_t3_font_Arial.h"
// TFT1/LCD1
#define TFT1__RST 2
#define TFT1__DC 15
#define TFT1__SPI0_CS 10
#define TFT1__SPI0_SCLK 13
#define TFT1__SPI0_MOSI 11
#define TFT1__SPI0_MISO 12
// TFT2/LCD2
#define TFT2__RST 4
#define TFT2__DC 5
#define TFT2__SPI1_CS 0
#define TFT2__SPI1_SCLK 27
#define TFT2__SPI1_MOSI 26
#define TFT2__SPI1_MISO 1
uint8_t a = 0;
uint8_t b = 5;
uint8_t c = 4;
uint8_t d = 26;
uint8_t e = 27;
uint8_t f = 1;
//FIRST DISPLAY: Successfully compiles for single display
ILI9488_t3 tft1 = ILI9488_t3(TFT1__SPI0_CS, TFT1__DC, TFT1__RST, TFT1__SPI0_MOSI, TFT1__SPI0_SCLK, TFT1__SPI0_MISO);
//SECOND DISPLAY: This line fails to compile for second display with 'ambiguous' error.
ILI9488_t3 tft2 = ILI9488_t3(TFT2__SPI1_CS, TFT2__DC, TFT2__RST, TFT2__SPI1_MOSI, TFT2__SPI1_SCLK, TFT2__SPI1_MISO);
//SECOND DISPLAY: This line successfully compiles for second display
//ILI9488_t3 tft2 = ILI9488_t3(a, TFT2__DC, TFT2__RST, TFT2__SPI1_MOSI, TFT2__SPI1_SCLK, TFT2__SPI1_MISO);
//SECOND DISPLAY: This line successfully compiles for second display
//ILI9488_t3 tft2 = ILI9488_t3(a, b, c, d, e, f);
void setup() {
}
void loop() {
}