acidportal- 😈 Worlds smallest Evil Portal on a LilyGo T-QT |
git clone git://git.acid.vegas/acidportal.git |
Log | Files | Refs | Archive | README | LICENSE |
Setup35_ILI9341_STM32_Port_Bus.h (2522B)
1 ////////////////////////////////////////////////////////////// 2 // Setup for STM32 and ILI9341 display // 3 ////////////////////////////////////////////////////////////// 4 #define USER_SETUP_ID 35 5 // Last update by Bodmer: 28/3/20 6 7 // Define STM32 to invoke STM32 optimised driver 8 #define STM32 9 10 // Define if Port A (B, C or D) pins 0-7 are used for data bus bits 0-7 11 // this will improve rendering performance by a factor of ~8x 12 #define STM_PORTA_DATA_BUS 13 //#define STM_PORTB_DATA_BUS // Pins below must re re-allocated to use this option 14 //#define STM_PORTC_DATA_BUS // Pins below must re re-allocated to use this option 15 //#define STM_PORTD_DATA_BUS // Pins below must re re-allocated to use this option 16 17 // Tell the library to use 8 bit parallel mode (otherwise SPI is assumed) 18 #define TFT_PARALLEL_8_BIT 19 20 // Define ONE of the the TFT display drivers 21 #define ILI9341_DRIVER 22 //#define ILI9481_DRIVER 23 //#define ILI9486_DRIVER 24 //#define ILI9488_DRIVER 25 //#define ST7796_DRIVER 26 27 #define TFT_CS PB7 // Chip select control pin 28 #define TFT_DC PB8 // Data Command control pin 29 #define TFT_RST PB0 // Reset pin 30 #define TFT_WR PB9 // Write strobe control pin 31 #define TFT_RD PB1 // Read pin 32 33 #define TFT_D0 PA0 // 8 bit Port A parallel bus to TFT 34 #define TFT_D1 PA1 35 #define TFT_D2 PA2 36 #define TFT_D3 PA3 37 #define TFT_D4 PA4 38 #define TFT_D5 PA5 39 #define TFT_D6 PA6 40 #define TFT_D7 PA7 41 42 #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH 43 #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters 44 #define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters 45 #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm 46 #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-. 47 #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. 48 #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts 49 50 // STM32 support for smooth fonts via program memory (FLASH) arrays 51 #define SMOOTH_FONT 52 53 // Assuming the processor clock is 72MHz: 54 #define SPI_FREQUENCY 36000000 // 36MHz SPI clock 55 //#define SPI_FREQUENCY 18000000 // 18MHz SPI clock 56 57 #define SPI_READ_FREQUENCY 12000000 // Reads need a slower SPI clock 58 59 #define SPI_TOUCH_FREQUENCY 2500000 // Must be very slow