Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 12 of 12

Thread: fillTriange issue with screen or buffer size?

  1. #1
    Junior Member
    Join Date
    Nov 2020
    Posts
    5

    fillTriange issue with screen or buffer size?

    In the code below, the fillTriangle() stops filling about halfway down the screen. drawTriangle() and it seems any other fill/draw call seems to work just fine. What could be causing this?
    I'm using stock Adafruit GFX and ILI9341 libraries.

    Thanks for any help.

    I'm using a Teensy 4.1 with a 320x240 TFT https://www.pjrc.com/store/display_ili9341_touch.html

    output: Click image for larger version. 

Name:	0xEkWCv.jpg 
Views:	9 
Size:	60.2 KB 
ID:	22537

    Code:
    #include <Arduino.h>
    #include <Adafruit_GFX.h>
    #include <Adafruit_ILI9341.h>
    #include <SPI.h>
    
    const uint16_t  tft_Color_Black        = 0x0000;
    const uint16_t  tft_Color_Blue         = 0x001F;
    const uint16_t  tft_Color_Red          = 0xF800;
    
    #define TFT_CS 10
    #define TFT_DC  9
    
    Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
    
    void setup() {
    
      delay(250);
    
      tft.begin();
      tft.setFont();
      tft.fillScreen(tft_Color_Black);
      tft.setRotation(0);
    
    }
    
    GFXcanvas16 *canvas = new GFXcanvas16 (240, 320);  //
    
    void loop() {
    
      canvas -> drawTriangle(0, 0, 240, 0, 120, 320, tft_Color_Red);  // This works fine
      canvas -> fillTriangle(0, 0, 240, 0, 120, 272, tft_Color_Blue);  // This is what stops halfway down screen.
      // tft.fillTriangle(0, 0, 240, 0, 120, 272, tft_Color_Blue);    // <- This would work fine.
      tft.drawRGBBitmap(0 , 0 , canvas -> getBuffer () , 240 , 320);
    
    }

  2. #2
    Member
    Join Date
    May 2019
    Location
    Colorado, USA
    Posts
    66
    On the fillTriangle, change 272 to 320 and see if that helps.

  3. #3
    Junior Member
    Join Date
    Nov 2020
    Posts
    5
    Quote Originally Posted by KD0RC View Post
    On the fillTriangle, change 272 to 320 and see if that helps.
    Interesting you laser focused on the number, I forgot to mention in my post above, if I change that number which is y2, to anything between 273-320, it completely breaks the triangle as shown below:

    Click image for larger version. 

Name:	pU4jW5L.jpg 
Views:	7 
Size:	98.2 KB 
ID:	22538

  4. #4
    Member
    Join Date
    May 2019
    Location
    Colorado, USA
    Posts
    66
    Hmmm... So the fillTriangle without the canvas works? I am unfamiliar with the canvas, but maybe that is the place to look. Could the x and y parms be backwards in the canvas?

  5. #5
    Junior Member
    Join Date
    Nov 2020
    Posts
    5
    Quote Originally Posted by KD0RC View Post
    Hmmm... So the fillTriangle without the canvas works?
    yes, the commented line works perfectly. And with the canvas, every other type of draw and fill command, writing text, anything else works perfectly except fillTriangle below that line. I can draw a small triangle perfectly above that line, and slowly moving the Y numbers down in value, it will just start cropping as it moves through that line.

  6. #6
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    8,183
    You might report it to Adafruit to see if the need to fix. Or you might try one of our Teensy specific libraries like ili9341_t3

  7. #7
    Junior Member
    Join Date
    Nov 2020
    Posts
    5
    Quote Originally Posted by KurtE View Post
    Or you might try one of our Teensy specific libraries like ili9341_t3
    I can't get ILI9341_t3 to compile for Teensy 4.1. Compiles fine with board set to 3.5.

    Code:
    Arduino: 1.8.13 (Mac OS X), TD: 1.53, Board: "Teensy 4.1, Serial, 600 MHz, Faster, US English"
    
    
    
    
    
    
    
    
    
    
    
    /Applications/Teensyduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Teensyduino.app/Contents/Java/hardware -tools /Applications/Teensyduino.app/Contents/Java/tools-builder -tools /Applications/Teensyduino.app/Contents/Java/hardware/tools/avr -built-in-libraries /Applications/Teensyduino.app/Contents/Java/libraries -libraries /Users/mike/Documents/Arduino/libraries -fqbn=teensy:avr:teensy41:usb=serial,speed=600,opt=o2std,keys=en-us -ide-version=10813 -build-path /var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_build_623455 -warnings=none -build-cache /var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_cache_177554 -verbose /Users/mike/Documents/Arduino/ECU_MultiScreen_TriangleTest_t3/ECU_MultiScreen_TriangleTest_t3.ino
    /Applications/Teensyduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Teensyduino.app/Contents/Java/hardware -tools /Applications/Teensyduino.app/Contents/Java/tools-builder -tools /Applications/Teensyduino.app/Contents/Java/hardware/tools/avr -built-in-libraries /Applications/Teensyduino.app/Contents/Java/libraries -libraries /Users/mike/Documents/Arduino/libraries -fqbn=teensy:avr:teensy41:usb=serial,speed=600,opt=o2std,keys=en-us -ide-version=10813 -build-path /var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_build_623455 -warnings=none -build-cache /var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_cache_177554 -verbose /Users/mike/Documents/Arduino/ECU_MultiScreen_TriangleTest_t3/ECU_MultiScreen_TriangleTest_t3.ino
    Using board 'teensy41' from platform in folder: /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr
    Using core 'teensy4' from platform in folder: /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr
    Detecting libraries used...
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 /var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_build_623455/sketch/ECU_MultiScreen_TriangleTest_t3.ino.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    Alternatives for Adafruit_GFX.h: [Adafruit_GFX_Library@1.10.2]
    ResolveLibrary(Adafruit_GFX.h)
      -> candidates: [Adafruit_GFX_Library@1.10.2]
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library /var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_build_623455/sketch/ECU_MultiScreen_TriangleTest_t3.ino.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    Alternatives for ILI9341_t3.h: [Adafruit_ILI9341@1.0]
    ResolveLibrary(ILI9341_t3.h)
      -> candidates: [Adafruit_ILI9341@1.0]
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 /var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_build_623455/sketch/ECU_MultiScreen_TriangleTest_t3.ino.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    Alternatives for SPI.h: [SPI@1.0]
    ResolveLibrary(SPI.h)
      -> candidates: [SPI@1.0]
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI /var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_build_623455/sketch/ECU_MultiScreen_TriangleTest_t3.ino.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI /Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_GFX.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI /Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_GrayOLED.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    Alternatives for Adafruit_I2CDevice.h: [Adafruit_BusIO@1.6.0]
    ResolveLibrary(Adafruit_I2CDevice.h)
      -> candidates: [Adafruit_BusIO@1.6.0]
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/mike/Documents/Arduino/libraries/Adafruit_BusIO /Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_GrayOLED.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    Alternatives for Wire.h: [Wire@1.0]
    ResolveLibrary(Wire.h)
      -> candidates: [Wire@1.0]
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/mike/Documents/Arduino/libraries/Adafruit_BusIO -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire /Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_GrayOLED.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/mike/Documents/Arduino/libraries/Adafruit_BusIO -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire /Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library/Adafruit_SPITFT.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/mike/Documents/Arduino/libraries/Adafruit_BusIO -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire /Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library/glcdfont.c -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/mike/Documents/Arduino/libraries/Adafruit_BusIO -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/mike/Documents/Arduino/libraries/Adafruit_BusIO -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/glcdfont.c -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/mike/Documents/Arduino/libraries/Adafruit_BusIO -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI/SPI.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/mike/Documents/Arduino/libraries/Adafruit_BusIO -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire /Users/mike/Documents/Arduino/libraries/Adafruit_BusIO/Adafruit_BusIO_Register.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/mike/Documents/Arduino/libraries/Adafruit_BusIO -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire /Users/mike/Documents/Arduino/libraries/Adafruit_BusIO/Adafruit_I2CDevice.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/mike/Documents/Arduino/libraries/Adafruit_BusIO -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire /Users/mike/Documents/Arduino/libraries/Adafruit_BusIO/Adafruit_SPIDevice.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/mike/Documents/Arduino/libraries/Adafruit_BusIO -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire/utility /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire/Wire.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/mike/Documents/Arduino/libraries/Adafruit_BusIO -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire/utility /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire/WireIMXRT.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/mike/Documents/Arduino/libraries/Adafruit_BusIO -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire/utility /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire/WireKinetis.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/mike/Documents/Arduino/libraries/Adafruit_BusIO -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire/utility /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire/utility/twi.c -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    Generating function prototypes...
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/mike/Documents/Arduino/libraries/Adafruit_BusIO -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire /var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_build_623455/sketch/ECU_MultiScreen_TriangleTest_t3.ino.cpp -o /var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_build_623455/preproc/ctags_target_for_gcc_minus_e.cpp -DARDUINO_LIB_DISCOVERY_PHASE
    /Applications/Teensyduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_build_623455/preproc/ctags_target_for_gcc_minus_e.cpp
    Compiling sketch...
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/precompile_helper /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 /var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_build_623455 /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 /var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_build_623455/pch/Arduino.h -o /var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_build_623455/pch/Arduino.h.gch
    Using previously compiled file: /var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_build_623455/pch/Arduino.h.gch
    /Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_build_623455/pch -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library -I/Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/mike/Documents/Arduino/libraries/Adafruit_BusIO -I/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire /var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_build_623455/sketch/ECU_MultiScreen_TriangleTest_t3.ino.cpp -o /var/folders/n1/2fz1ks3j52g3hd8zlb855mvr0000gn/T/arduino_build_623455/sketch/ECU_MultiScreen_TriangleTest_t3.ino.cpp.o
    In file included from /Users/mike/Documents/Arduino/ECU_MultiScreen_TriangleTest_t3/ECU_MultiScreen_TriangleTest_t3.ino:3:0:
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h: In member function 'void ILI9341_t3::waitFifoNotFull()':
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:178:9: error: 'KINETISK_SPI0' was not declared in this scope
        sr = KINETISK_SPI0.SR;
             ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h: In member function 'void ILI9341_t3::waitFifoEmpty()':
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:187:9: error: 'KINETISK_SPI0' was not declared in this scope
        sr = KINETISK_SPI0.SR;
             ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h: In member function 'void ILI9341_t3::waitTransmitComplete()':
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:193:12: error: 'KINETISK_SPI0' was not declared in this scope
       while (!(KINETISK_SPI0.SR & SPI_SR_TCF)) ; // wait until final output done
                ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:193:31: error: 'SPI_SR_TCF' was not declared in this scope
       while (!(KINETISK_SPI0.SR & SPI_SR_TCF)) ; // wait until final output done
                                   ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:194:9: error: 'KINETISK_SPI0' was not declared in this scope
       tmp = KINETISK_SPI0.POPR;                  // drain the final RX FIFO word
             ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h: In member function 'void ILI9341_t3::writecommand_cont(uint8_t)':
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:197:3: error: 'KINETISK_SPI0' was not declared in this scope
       KINETISK_SPI0.PUSHR = c | (pcs_command << 16) | SPI_PUSHR_CTAS(0) | SPI_PUSHR_CONT;
       ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:197:67: error: 'SPI_PUSHR_CTAS' was not declared in this scope
       KINETISK_SPI0.PUSHR = c | (pcs_command << 16) | SPI_PUSHR_CTAS(0) | SPI_PUSHR_CONT;
                                                                       ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:197:71: error: 'SPI_PUSHR_CONT' was not declared in this scope
       KINETISK_SPI0.PUSHR = c | (pcs_command << 16) | SPI_PUSHR_CTAS(0) | SPI_PUSHR_CONT;
                                                                           ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h: In member function 'void ILI9341_t3::writedata8_cont(uint8_t)':
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:201:3: error: 'KINETISK_SPI0' was not declared in this scope
       KINETISK_SPI0.PUSHR = c | (pcs_data << 16) | SPI_PUSHR_CTAS(0) | SPI_PUSHR_CONT;
       ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:201:64: error: 'SPI_PUSHR_CTAS' was not declared in this scope
       KINETISK_SPI0.PUSHR = c | (pcs_data << 16) | SPI_PUSHR_CTAS(0) | SPI_PUSHR_CONT;
                                                                    ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:201:68: error: 'SPI_PUSHR_CONT' was not declared in this scope
       KINETISK_SPI0.PUSHR = c | (pcs_data << 16) | SPI_PUSHR_CTAS(0) | SPI_PUSHR_CONT;
                                                                        ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h: In member function 'void ILI9341_t3::writedata16_cont(uint16_t)':
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:205:3: error: 'KINETISK_SPI0' was not declared in this scope
       KINETISK_SPI0.PUSHR = d | (pcs_data << 16) | SPI_PUSHR_CTAS(1) | SPI_PUSHR_CONT;
       ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:205:64: error: 'SPI_PUSHR_CTAS' was not declared in this scope
       KINETISK_SPI0.PUSHR = d | (pcs_data << 16) | SPI_PUSHR_CTAS(1) | SPI_PUSHR_CONT;
                                                                    ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:205:68: error: 'SPI_PUSHR_CONT' was not declared in this scope
       KINETISK_SPI0.PUSHR = d | (pcs_data << 16) | SPI_PUSHR_CTAS(1) | SPI_PUSHR_CONT;
                                                                        ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h: In member function 'void ILI9341_t3::writecommand_last(uint8_t)':
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:210:3: error: 'KINETISK_SPI0' was not declared in this scope
       KINETISK_SPI0.SR = SPI_SR_TCF;
       ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:210:22: error: 'SPI_SR_TCF' was not declared in this scope
       KINETISK_SPI0.SR = SPI_SR_TCF;
                          ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:211:67: error: 'SPI_PUSHR_CTAS' was not declared in this scope
       KINETISK_SPI0.PUSHR = c | (pcs_command << 16) | SPI_PUSHR_CTAS(0);
                                                                       ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h: In member function 'void ILI9341_t3::writedata8_last(uint8_t)':
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:216:3: error: 'KINETISK_SPI0' was not declared in this scope
       KINETISK_SPI0.SR = SPI_SR_TCF;
       ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:216:22: error: 'SPI_SR_TCF' was not declared in this scope
       KINETISK_SPI0.SR = SPI_SR_TCF;
                          ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:217:64: error: 'SPI_PUSHR_CTAS' was not declared in this scope
       KINETISK_SPI0.PUSHR = c | (pcs_data << 16) | SPI_PUSHR_CTAS(0);
                                                                    ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h: In member function 'void ILI9341_t3::writedata16_last(uint16_t)':
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:222:3: error: 'KINETISK_SPI0' was not declared in this scope
       KINETISK_SPI0.SR = SPI_SR_TCF;
       ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:222:22: error: 'SPI_SR_TCF' was not declared in this scope
       KINETISK_SPI0.SR = SPI_SR_TCF;
                          ^
    /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341/ILI9341_t3.h:223:64: error: 'SPI_PUSHR_CTAS' was not declared in this scope
       KINETISK_SPI0.PUSHR = d | (pcs_data << 16) | SPI_PUSHR_CTAS(1);
                                                                    ^
    Using library Adafruit_GFX_Library at version 1.10.2 in folder: /Users/mike/Documents/Arduino/libraries/Adafruit_GFX_Library 
    Using library Adafruit_ILI9341 at version 1.0 in folder: /Users/mike/Documents/Arduino/libraries/Adafruit_ILI9341 
    Using library SPI at version 1.0 in folder: /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI 
    Using library Adafruit_BusIO at version 1.6.0 in folder: /Users/mike/Documents/Arduino/libraries/Adafruit_BusIO 
    Using library Wire at version 1.0 in folder: /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Wire 
    Error compiling for board Teensy 4.1.

  8. #8
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    8,183
    You must have a really old version of the library. Also not sure why it is inside of Adafruit_ili9341 directory.

    Note: The current versions are installed by Teensyduino in the <where you install arduino>/hardware/teensy/avr/libraries/ili9341_t3

    Which is not used here. Also note I mostly use my own version ili9341_t3n (https://github.com/kurte/ili9341_t3n)
    Note: Our libraries don't use the Canvas stuff of Adafruit.

    But the ili9341_t3n has an ability to turn on a frame buffer and do writes through it, where you then tell the screen to update...


    For example this sketch works:
    Code:
    #include <ILI9341_t3n.h>
    
    const uint16_t  tft_Color_Black        = 0x0000;
    const uint16_t  tft_Color_Blue         = 0x001F;
    const uint16_t  tft_Color_Red          = 0xF800;
    
    #define TFT_CS 10
    #define TFT_DC  9
    #define TFT_RST  8
    
    ILI9341_t3n tft = ILI9341_t3n(TFT_CS, TFT_DC, TFT_RST);
    
    void setup() {
    
      delay(250);
    
      tft.begin();
      tft.setFont();
      tft.fillScreen(tft_Color_Black);
      tft.setRotation(0);
    
    }
    
    int loop_count = 0;
    void loop() {
      loop_count++;
      if (loop_count & 1) {
        tft.useFrameBuffer(0); // make sure frame buffer is turned off.
        tft.drawTriangle(0, 0, 240, 0, 120, 320, ILI9341_RED);  // This works fine
        tft.fillTriangle(0, 0, 240, 0, 120, 272, ILI9341_BLUE);  // This is what stops halfway down screen.
      } else {
        tft.useFrameBuffer(1);
        tft.drawTriangle(0, 0, 240, 0, 120, 320, ILI9341_BLUE);  // This works fine
        tft.fillTriangle(0, 0, 240, 0, 120, 272, ILI9341_RED);  // This is what stops halfway down screen.
        tft.updateScreen();
      }
      delay(250);
    }
    It shows it alternating from use frame buffer or not using frame buffer. Ana I alternate which color is use for fill and draw...
    Click image for larger version. 

Name:	IMG_1269.jpg 
Views:	5 
Size:	91.6 KB 
ID:	22551

  9. #9
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    8,183
    Again should note, I converted the sketch to use Adafruit minus the canvas and worked fine.

    Canvas blows up as you specified. So I opened an issue up on Adafruit: https://github.com/adafruit/Adafruit...ary/issues/325

  10. #10
    Junior Member
    Join Date
    Nov 2020
    Posts
    5
    Thanks for your help everyone, I was able to get it working with KurtE's library. It looks to be like 10X faster too! Awesome.

    Now if I can just figure out how to make a filled Arc....

  11. #11
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    8,183
    Also I should mention there is a minor issue with this example:
    like: fillRectangle(0, 0, 240, 0, 120, 320, tft_Color_Red
    That is the display is 240x320, so the valid ranges for this orientation is X: 0-239 and y: 0-319

    Note changing the fill did not fix the issue.

    Although I have found the problem... Will update the Issue...

    But if anyone wishes to use the Canvas stuff, the fix is near the end of the Adafruit_GFX.cpp file.
    Code:
    void GFXcanvas16::drawFastRawHLine(int16_t x, int16_t y, int16_t w,
                                       uint16_t color) {
      // x & y already in raw (rotation 0) coordinates, no need to transform.
      uint32_t buffer_index = y * WIDTH + x;
      Serial.printf("  DFRHL: %d %d %d: %u\n", x, y, w, buffer_index);
      for (uint32_t i = buffer_index; i < buffer_index + w; i++) {
        buffer[i] = color;
      }
    }
    I changed the two defines in RED to uint32_t, the first was size_t and the other was int16_t, but when you are working with displays of 320x240 the whole index wont fit into
    an int16_t...

  12. #12
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    8,183
    Quick followup on the Canvas issue.

    I went ahead and did a Pull Request for the fix, which has been merged and a new version of the Adafruit_gfx library has been released.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •