acid-drop- Hacking the planet from a LilyGo T-Deck using custom firmware |
git clone git://git.acid.vegas/acid-drop.git |
Log | Files | Refs | Archive | README | LICENSE |
Arduino_GFX_Library.cpp (1429B)
1 #include "Arduino_GFX_Library.h" 2 3 Arduino_DataBus *create_default_Arduino_DataBus() 4 { 5 #if defined(ARDUINO_ARCH_NRF52840) 6 return new Arduino_NRFXSPI(DF_GFX_DC, DF_GFX_CS, DF_GFX_SCK, DF_GFX_MOSI, DF_GFX_MISO); 7 #elif defined(TARGET_RP2040) 8 return new Arduino_RPiPicoSPI(DF_GFX_DC, DF_GFX_CS, DF_GFX_SCK, DF_GFX_MOSI, DF_GFX_MISO, DF_GFX_SPI); 9 #elif defined(ESP32) 10 return new Arduino_ESP32SPI(DF_GFX_DC, DF_GFX_CS, DF_GFX_SCK, DF_GFX_MOSI, DF_GFX_MISO); 11 #elif defined(ESP8266) 12 return new Arduino_ESP8266SPI(DF_GFX_DC, DF_GFX_CS); 13 #else 14 return new Arduino_HWSPI(DF_GFX_DC, DF_GFX_CS); 15 #endif 16 } 17 18 Arduino_GFX *create_default_Arduino_GFX() 19 { 20 Arduino_DataBus *bus = create_default_Arduino_DataBus(); 21 #if defined(WIO_TERMINAL) 22 return new Arduino_ILI9341(bus, DF_GFX_RST, 1 /* rotation */); 23 #elif defined(ESP32_S3_BOX) 24 return new Arduino_ILI9342(bus, DF_GFX_RST, 0 /* rotation */); 25 #elif defined(M5STACK_CORE) 26 return new Arduino_ILI9342(bus, DF_GFX_RST, 2 /* rotation */); 27 #elif defined(ODROID_GO) 28 return new Arduino_ILI9341(bus, DF_GFX_RST, 3 /* rotation */); 29 #elif defined(TTGO_T_WATCH) 30 return new Arduino_ST7789(bus, DF_GFX_RST, 0 /* rotation */, true /* IPS */, 240, 240, 0, 80); 31 #elif defined(WAVESHARE_RP2040_LCD_1_28) 32 return new Arduino_ST7789(bus, DF_GFX_RST, 0 /* rotation */, true /* IPS */, 240, 240, 0, 80); 33 #else 34 return new Arduino_GC9A01(bus, DF_GFX_RST, 0 /* rotation */, true /* IPS */); 35 #endif 36 }