acidportal- 😈 Worlds smallest Evil Portal on a LilyGo T-QT |
git clone git://git.acid.vegas/acidportal.git |
Log | Files | Refs | Archive | README | LICENSE |
Setup106_RP2040_ILI9481_16bit_parallel.h (3868B)
1 // This setup is for the RP2040 processor when used with 8 bit parallel displays 2 // See SetupX_Template.h for all options available 3 #define USER_SETUP_ID 106 4 5 //////////////////////////////////////////////////////////////////////////////////////////// 6 // Interface 7 //////////////////////////////////////////////////////////////////////////////////////////// 8 //#define TFT_PARALLEL_8_BIT 9 #define TFT_PARALLEL_16_BIT 10 11 // The parallel interface write cycle period is derived from a division of the CPU clock 12 // speed so scales with the processor clock. This means that the divider ratio may need 13 // to be increased when overclocking. I may also need to be adjusted dependant on the 14 // display controller type (ILI94341, HX8357C etc). If RP2040_PIO_CLK_DIV is not defined 15 // the library will set default values which may not suit your display. 16 // The display controller data sheet will specify the minimum write cycle period. The 17 // controllers often work reliably for shorter periods, however if the period is too short 18 // the display may not initialise or graphics will become corrupted. 19 // PIO write cycle frequency = (CPU clock/(4 * RP2040_PIO_CLK_DIV)) 20 //#define RP2040_PIO_CLK_DIV 1 // 32ns write cycle at 125MHz CPU clock 21 //#define RP2040_PIO_CLK_DIV 2 // 64ns write cycle at 125MHz CPU clock 22 //#define RP2040_PIO_CLK_DIV 3 // 96ns write cycle at 125MHz CPU clock 23 //#define RP2040_PIO_CLK_DIV 4 // 96ns write cycle at 125MHz CPU clock 24 25 //////////////////////////////////////////////////////////////////////////////////////////// 26 // Display driver type 27 //////////////////////////////////////////////////////////////////////////////////////////// 28 #define ILI9481_DRIVER 29 //#define HX8357B_DRIVER 30 //#define HX8357C_DRIVER 31 32 //////////////////////////////////////////////////////////////////////////////////////////// 33 // RP2040 pins used 34 //////////////////////////////////////////////////////////////////////////////////////////// 35 36 // These pins can be moved and are controlled directly by the library software 37 #define TFT_RST 18 // Reset pin 38 #define TFT_CS 19 // Do not define if chip select control pin permanently connected to 0V 39 //#define TFT_RD -1 // Do not define, read pin must be permanently connected to 3V3 40 41 // Note: All the following pins are PIO hardware configured and driven 42 #define TFT_WR 16 // Write strobe pin 43 #define TFT_DC 17 // Data Command control pin 44 45 // PIO requires these to be sequentially increasing 46 #define TFT_D0 0 47 #define TFT_D1 1 48 #define TFT_D2 2 49 #define TFT_D3 3 50 #define TFT_D4 4 51 #define TFT_D5 5 52 #define TFT_D6 6 53 #define TFT_D7 7 54 #define TFT_D8 8 55 #define TFT_D9 9 56 #define TFT_D10 10 57 #define TFT_D11 11 58 #define TFT_D12 12 59 #define TFT_D13 13 60 #define TFT_D14 14 61 #define TFT_D15 15 62 //*/ 63 64 //////////////////////////////////////////////////////////////////////////////////////////// 65 // Fonts to be available 66 //////////////////////////////////////////////////////////////////////////////////////////// 67 #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH 68 #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters 69 #define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters 70 #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm 71 #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. 72 #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. 73 #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts 74 75 #define SMOOTH_FONT 76 77 ////////////////////////////////////////////////////////////////////////////////////////////