6 void UTFT::LCD_Writ_Bus(
char VH,
char VL, byte mode)
11 if (display_serial_mode==SERIAL_4PIN)
17 pulse_low(P_SCL, B_SCL);
31 pulse_low(P_SCL, B_SCL);
36 pulse_low(P_SCL, B_SCL);
41 pulse_low(P_SCL, B_SCL);
46 pulse_low(P_SCL, B_SCL);
51 pulse_low(P_SCL, B_SCL);
56 pulse_low(P_SCL, B_SCL);
61 pulse_low(P_SCL, B_SCL);
66 pulse_low(P_SCL, B_SCL);
69 HWREG(GPIOA0_BASE + 0x03FC) = VH;
70 pulse_low(P_WR, B_WR);
71 HWREG(GPIOA0_BASE + 0x03FC) = VL;
72 pulse_low(P_WR, B_WR);
75 HWREG(GPIOA0_BASE + 0x03FC) = VH;
76 HWREG(GPIOA1_BASE + 0x03FC) = VL;
77 pulse_low(P_WR, B_WR);
85 void UTFT::_set_direction_registers(byte mode)
89 HWREG(GPIOA0_BASE + 0x0400) = 0xFF;
90 for (
int i = 0xA0; i <= 0xBC; i+=4)
91 HWREG(0x4402E000 + i) = ((HWREG(0x4402E000 + i) & 0xFFFFFFF0) & ~(3<<10));
94 HWREG(GPIOA1_BASE + 0x0400) = 0xFF;
95 for (
int i = 0xC0; i <= 0xDC; i+=4)
96 HWREG(0x4402E000 + i) = ((HWREG(0x4402E000 + i) & 0xFFFFFFF0) & ~(3<<10));
105 void UTFT::_fast_fill_16(
int ch,
int cl,
long pix)
109 HWREG(GPIOA0_BASE + 0x03FC) = ch;
110 HWREG(GPIOA1_BASE + 0x03FC) = cl;
112 for (
int i=0; i<blocks; i++)
114 pulse_low(P_WR, B_WR);
115 pulse_low(P_WR, B_WR);
116 pulse_low(P_WR, B_WR);
117 pulse_low(P_WR, B_WR);
118 pulse_low(P_WR, B_WR);
119 pulse_low(P_WR, B_WR);
120 pulse_low(P_WR, B_WR);
121 pulse_low(P_WR, B_WR);
122 pulse_low(P_WR, B_WR);
123 pulse_low(P_WR, B_WR);
124 pulse_low(P_WR, B_WR);
125 pulse_low(P_WR, B_WR);
126 pulse_low(P_WR, B_WR);
127 pulse_low(P_WR, B_WR);
128 pulse_low(P_WR, B_WR);
129 pulse_low(P_WR, B_WR);
132 for (
int i=0; i<(pix % 16)+1; i++)
134 pulse_low(P_WR, B_WR);
138 void UTFT::_fast_fill_8(
int ch,
long pix)
142 HWREG(GPIOA0_BASE + 0x03FC) = ch;
144 for (
int i=0; i<blocks; i++)
146 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
147 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
148 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
149 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
150 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
151 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
152 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
153 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
154 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
155 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
156 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
157 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
158 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
159 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
160 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
161 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
164 for (
int i=0; i<(pix % 16)+1; i++)
166 pulse_low(P_WR, B_WR);pulse_low(P_WR, B_WR);
170 volatile uint32_t* UTFT::portOutputRegister(
int value)
172 return portBASERegister(value);