Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #12

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

Dev #12

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/run-cl-arduino.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ jobs:
echo "PNG Images/Flash_PNG,Seeeduino:renesas_uno:XIAO_RA4M1" >> ignore.list
echo "PNG Images/Flash_transparent_PNG,Seeeduino:renesas_uno:XIAO_RA4M1" >> ignore.list
echo "Round Display/Arduino_Life,Seeeduino:renesas_uno:XIAO_RA4M1" >> ignore.list
echo "Round Display/GifPlayer ,Seeeduino:nrf52:xiaonRF52840" >> ignore.list
echo "Round Display/GifPlayer ,Seeeduino:renesas_uno:XIAO_RA4M1" >> ignore.list



# no SPIFFS so can't compile
Expand Down
4 changes: 3 additions & 1 deletion Extensions/EPaper.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ class EPaper : public TFT_eSprite

private:
bool _sleep;
};
};

#include "EPaper.cpp"
2 changes: 1 addition & 1 deletion TFT_eSPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#elif defined(ARDUINO_XIAO_RA4M1)
#include "Processors/TFT_eSPI_RA4M1.c"
#elif defined(NRF52840_XXAA)
#include "Processors/TFT_eSPI_NRF52840.c"
#include "Processors/TFT_eSPI_nRF52840.c"
#elif defined (EFR32MG24B220F1536IM48)
#include "Processors/TFT_eSPI_MG24.cpp"
#else
Expand Down
10 changes: 6 additions & 4 deletions User_Setup_Select.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,20 @@
//#include <User_Setups/ILI9225.h>


#ifdef WIO_TERMINAL
#if defined(WIO_TERMINAL)
#include <User_Setups/Setup500_Seeed_Wio_Terminal.h> // Setup file for Seeed Wio Terimal with SPI ILI9341 320x240
#else
#elif defined(SEEED_XIAO_ROUND_DISPLAY)
#include <User_Setups/Setup501_Seeed_XIAO_Round_Display.h> // Setup file for Seeed XIAO ROUND with GC9A01 240 x 240
// #include <User_Setups/Setup502_Seeed_XIAO_EPaper_7inch5.h> // Setup file for Seeed XIAO ROUND with GC9A01 240 x 240
#elif defined(SEEED_XIAO_EPAPER_7INCH5)
#include <User_Setups/Setup502_Seeed_XIAO_EPaper_7inch5.h>
#else
#include <User_Setups/Setup666_XIAO_ILI9341.h>
#endif


#endif // USER_SETUP_LOADED

// Compatible with some examples
// #include "TFT_Drivers/ILI9341_Defines.h"
#ifdef NRF52840_XXAA
#include <avr/dtostrf.h>
#endif
Expand Down
70 changes: 70 additions & 0 deletions User_Setups/Setup666_XIAO_ILI9341.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#include <Wire.h>

#define USER_SETUP_ID 666

#define ILI9341_DRIVER

// #define TFT_INVERSION_ON
#define TFT_RGB_ORDER TFT_RBG // Colour order Blue-Green-Red
// #define TFT_WIDTH 240
// #define TFT_HEIGHT 240 // GC9A01 240 x 240

#define TFT_SCLK D8
#define TFT_MISO D9
#define TFT_MOSI D10

#define TFT_CS D1 // Chip select control pin
#define TFT_DC D3 // Data Command control pin
// #define TFT_BL D6

// #define TFT_BACKLIGHT_ON HIGH
#define TFT_RST D0 // Reset pin (could connect to RST pin)

// Touchscreen
#define CHSCX6X_DRIVER
#define TOUCH_INT D7
#define TOUCH_WIRE Wire

#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts

#define SMOOTH_FONT


#if defined(SEEED_XIAO_M0)
#define SPI_FREQUENCY 12000000
#define SPI_READ_FREQUENCY 4000000
#elif defined(ARDUINO_XIAO_ESP32S3)
#define SPI_FREQUENCY 50000000
#define SPI_READ_FREQUENCY 12000000
#define USE_HSPI_PORT
#elif defined(ARDUINO_XIAO_ESP32C3)
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 6000000
#elif defined(ARDUINO_XIAO_ESP32C6)
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 6000000
#elif defined(ARDUINO_SEEED_XIAO_NRF52840) || defined(ARDUINO_SEEED_XIAO_NRF52840_SENSE) || defined(ARDUINO_Seeed_XIAO_nRF52840) || defined(ARDUINO_Seeed_XIAO_nRF52840_Sense)
#define SPI_FREQUENCY 12000000
#define SPI_READ_FREQUENCY 4000000
#define ltoa itoa
#elif defined(ARDUINO_SEEED_XIAO_RP2040) || defined(ARDUINO_SEEED_XIAO_RP2350)
#define SPI_FREQUENCY 62500000
#define SPI_READ_FREQUENCY 12000000
#elif defined(ARDUINO_XIAO_RA4M1)
#define SPI_FREQUENCY 25000000
#define SPI_READ_FREQUENCY 4000000
#elif defined (EFR32MG24B220F1536IM48)
#define SPI_FREQUENCY 25000000
#define SPI_READ_FREQUENCY 4000000
#else
#message "Unknown board using default SPI settings (25MHz)"
#define SPI_FREQUENCY 25000000
#define SPI_READ_FREQUENCY 4000000
#endif
1 change: 1 addition & 0 deletions examples/Round Display/Arduino_Life/Arduino_Life.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

// Adapted by Bodmer

#define SEEED_XIAO_ROUND_DISPLAY
#include <TFT_eSPI.h> // Hardware-specific library
#include <SPI.h>

Expand Down
1 change: 1 addition & 0 deletions examples/Round Display/GifPlayer/GifPlayer.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <vector>
#define SEEED_XIAO_ROUND_DISPLAY
#include <TFT_eSPI.h>
#include <SPI.h>
#include <SD.h>
Expand Down
1 change: 1 addition & 0 deletions examples/Round Display/Pong_v3/Pong_v3.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define WHITE 0xFFFF
#define GREY 0x5AEB

#define SEEED_XIAO_ROUND_DISPLAY
#include <TFT_eSPI.h> // Graphics and font library for ST7735 driver chip
#include <SPI.h>

Expand Down
2 changes: 2 additions & 0 deletions examples/Round Display/TFT_Clock/TFT_Clock.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include <Arduino.h>

#define SEEED_XIAO_ROUND_DISPLAY
#include <TFT_eSPI.h>
#include <SPI.h>
#include <Wire.h>
Expand Down
1 change: 1 addition & 0 deletions examples/Round Display/TFT_flash_jpg/TFT_flash_jpg.ino
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//----------------------------------------------------------------------------------------------------

#include <SPI.h>
#define SEEED_XIAO_ROUND_DISPLAY
#include <TFT_eSPI.h>

TFT_eSPI tft = TFT_eSPI();
Expand Down
1 change: 1 addition & 0 deletions examples/Round Display/Touch_Pannel/Touch_Pannel.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <Arduino.h>
#define SEEED_XIAO_ROUND_DISPLAY
#include <TFT_eSPI.h>
#include <SPI.h>

Expand Down
1 change: 1 addition & 0 deletions examples/ePaper/Basic/Bitmap/Bitmap.ino
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define SEEED_XIAO_EPAPER_7INCH5
#include "TFT_eSPI.h"
#include "image.h"
EPaper epaper;
Expand Down
1 change: 1 addition & 0 deletions examples/ePaper/Basic/Clock/Clock.ino
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/

#include <SPI.h>
#define SEEED_XIAO_EPAPER_7INCH5
#include <TFT_eSPI.h> // Hardware-specific library

EPaper epaper = EPaper(); // Invoke custom library
Expand Down
4 changes: 3 additions & 1 deletion examples/ePaper/Basic/Clock_Digital/Clock_Digital.ino
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ code color
0xF81F Pink

*/

#define SEEED_XIAO_EPAPER_7INCH5
#include <TFT_eSPI.h> // Graphics and font library for ST7735 driver chip
#include <SPI.h>



EPaper epaper = EPaper(); // Invoke library, pins defined in User_Setup.h

uint32_t targetTime = 0; // for next 1 second timeout
Expand Down
1 change: 1 addition & 0 deletions examples/ePaper/Basic/Shape/Shape.ino
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define SEEED_XIAO_EPAPER_7INCH5
#include "TFT_eSPI.h"

EPaper epaper;
Expand Down
1 change: 1 addition & 0 deletions examples/ePaper/Sprite/Clock/Clock.ino
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/

#include <SPI.h>
#define SEEED_XIAO_EPAPER_7INCH5
#include <TFT_eSPI.h> // Hardware-specific library

EPaper epaper = EPaper(); // Invoke custom library
Expand Down