bitbank2 / bb_spi_lcd

SPI LCD/OLED library which can be built for Arduino and Linux
GNU General Public License v3.0
89 stars 13 forks source link

Version <2.5.0 doesn't compile on Teensy #19

Closed Nico4555 closed 3 months ago

Nico4555 commented 3 months ago

Since the DMA parameter was integrated into the initialization, I can no longer compile my scatch for the Teensy 4.0. All examples will also not compile unless I use a different target like ESP32. When I use an older version everything seems to work. These are the params used:

// LCD

define TFT_CS 10

define TFT_RST -1

define TFT_DC 5

define TFT_LED 4

define TFT_MOSI 11

define TFT_SCK 13

define TFT_DMA 18

// In Setup:

spilcdInit(&lcd, LCD_ST7789_240, FLAGS_NONE, 40000000, TFT_CS, TFT_DC, TFT_RST, TFT_LED, -1, TFT_MOSI, TFT_SCK, TFT_DMA);

// Error Message:

/Users/nico/Library/Arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld: /private/var/folders/5y/d7cssz3n79g1cypwdh9xnk6h0000gn/T/arduino/sketches/303FA847A94E5B39878BC7D97E824030/sketch/teensy_Poly_Synth_V2_5.ino.cpp.o: in function setup': /Users/nico/Documents/Arduino/projects/teensy_Poly_Synth_V2_5/teensy_Poly_Synth_V2_5.ino:351: undefined reference tospilcdInit(tagSPILCD*, int, int, long, int, int, int, int, int, int, int, int)' collect2: error: ld returned 1 exit status Multiple libraries were found for "SD.h" Used: /Users/nico/Library/Arduino15/packages/teensy/hardware/avr/1.59.0/libraries/SD Not used: /Users/nico/Library/Arduino15/libraries/SD Not used: /Users/nico/Documents/Arduino/libraries/SD Multiple libraries were found for "SdFat.h" Used: /Users/nico/Library/Arduino15/packages/teensy/hardware/avr/1.59.0/libraries/SdFat Not used: /Users/nico/Documents/Arduino/libraries/SdFat_-_Adafruit_Fork exit status 1

bitbank2 commented 3 months ago

What is "TFT_DMA 18"? Yes, the C API has breaking changes in the new version. Check the .H file for how to use the updated functions