Source file: /~heha/Mikrocontroller/Displays/utft/Kalender.zip/ILI9341/utft-config.h

// User configuration
#ifdef SHIELD_ITDB02	// Frank Philippczyk
// Treiber-IC: ILI9325DS
// Farben: 65K (5-6-5 Bits)
#define DISP_ILI9325D	// required
#define DISP_X_SIZE 240		// required
#define DISP_Y_SIZE 320		// required
#define DISP_TRANSFER 8
#define DISP_CMD16		// commands are transferred as 16-bit units
#define DISP_SETXY

#define DISP_CS(x) {if (x) PORTC|=0x08; else PORTC&=~0x08;}
#define DISP_WR(x) {if (x) PORTC|=0x10; else PORTC&=~0x10;}
#define DISP_RS(x) {if (x) PORTC|=0x20; else PORTC&=~0x20;}
#define DISP_DDR(x) {if (x) DDRD=0xFF; else DDRD=0;}
#define DISP_OUT(x) {PORTD=(x);}
#define DISP_INIT() {PORTC|=0x38;DDRC|=0x38;}
/* Hardware „2.8 ITDB02 Shield Itead Studio“
Arduino	ATmega328P	Signal
D0	PD0	TxD	DB8
D1	PD1	RxD	DB9
D2	PD2	INT0	DB10
D3	PD3	INT1	DB11
D4	PD4	T0	DB12
D5	PD5	T1	DB13
D6	PD6	AIN0	DB14
D7	PD7	AIN1	DB15
D8	PB0	ICP	Touch_Dout	ADS7843 (Touch-Chip)
D9	PB1	OC1	Touch_IRQ	-"-
D10	PB2	!SS	SD_CS			Standard-SD-Kartenslot
D11	PB3	MOSI	SD_MOSI			-"-
D12	PB4	MISO	SD_MISO			-"-
D13	PB5	SCK	SD_SCK			-"-
A0	PC0	ADC0	Touch_Din	-"-
A1	PC1	ADC1	Touch_CLK	-"-
A2	PC2	ADC2	-
A3	PC3	ADC3	TFT_CS
A4	PC4	ADC4	TFT_WR
A5	PC5	ADC5	TFT_RS
Wegen der unidirektionalen Pegelkonverter können Displaydaten nicht gelesen werden.
*/

#elif defined(SHIELD_TFT24)	// Tino Bochmann, Michael Schulze, billig
// Display chip
//#define DISP_ILI9341	// required
#define DISP_S6D04H0	// Lieferung September 2016
//#define DISP_ILI9481	// Lieferung September 2016
// Possible:
//	DISP_HX8347A	DISP_HX8352A	DISP_HX8340B_8	DISP_HX8340B_S	DISP_HX8353C
//	DISP_ILI9327	DISP_ILI9325C	DISP_ILI9325D	DISP_ILI9325D_ALT	DISP_ILI9481	DISP_ILI9341_S4P	DISP_ILI9341_S5P	DISP_ILI9486
//	DISP_SSD1289	DISP_SSD1963_480	DISP_SSD1963_800	DISP_SSD1963_800_ALT
//	DISP_ST7735	DISP_ST7735_ALT	DISP_ST7735S
//	DISP_S1D19122 (grayscale 240x320)
//	DISP_PCF8833
//	DISP_S6D1121	DISP_S6D0164
//	DISP_R61581
//	DISP_CPLD

// Physical display size
#define DISP_X_SIZE 240		// required
#define DISP_Y_SIZE 320		// required
//#define DISP_X_SIZE 320
//#define DISP_Y_SIZE 480

// Transfer mode (1, 8 or 16)
#define DISP_TRANSFER 8

// Alle ILI durchprobiert: nix!
#define DISP_RD(x) {if (x) PORTC|=0x01; else PORTC&=~0x01;}	// optional
#define DISP_WR(x) {if (x) PORTC|=0x02; else PORTC&=~0x02;}	// required if DISP_TRANSFER>1
#define DISP_RS(x) {if (x) PORTC|=0x04; else PORTC&=~0x04;}	// required
#define DISP_CS(x) {if (x) PORTC|=0x08; else PORTC&=~0x08;}	// required
#define DISP_RST(x) {if (x) PORTC|=0x10; else PORTC&=~0x10;}	// optional
#define DISP_DDR(x) {if (x) DDRD|=0xFC,DDRB|=0x03; else DDRD&=~0xFC,DDRB&=~0x03;}	// required if DISP_RD defined
#define DISP_OUT(x) {PORTD=PORTD&0x03|(x)&0xFC; PORTB=PORTB&0xFC|(x)&0x03;}		// required if DISP_TRANSFER>1
#define DISP_IN() PIND&0xFC|PINB&0x03				// required if DISP_RD defined
#define DISP_INIT() {PORTC|=0x1F;DDRC|=0x1F;}			// required; DISP_DDR(1) is automatically invoked

#else
#error

#endif

/*For 1-wire
#define DISP_RS(x) {DISP_SDA(x); DISP_SCL(0); DISP_SCL(1);}
*/
#define DISP_PRINTF	// include printf functions (consumes more flash)
Detected encoding: UTF-80