33#if (defined(FT9XX_PLATFORM)) \
34 && (defined(ENABLE_ILI9488_HVGA_PORTRAIT) || defined(ENABLE_KD2401_HVGA_PORTRAIT))
52 spi_open(SPIM, ILI9488_SEL);
53 spi_writen(SPIM, &
cmd, 1);
55 spi_writen(SPIM, &data, 1);
58 spi_close(SPIM, ILI9488_SEL);
79 spi_open(SPIM, ILI9488_SEL);
80 spi_writen(SPIM, &
cmd, 1);
82 spi_writen(SPIM, pbuff, bytecount);
83 spi_close(SPIM, ILI9488_SEL);
103 spi_open(SPIM, ILI9488_SEL);
104 spi_writen(SPIM, &
cmd, 1);
106 spi_readn(SPIM, &readbyte, 1);
107 spi_close(SPIM, ILI9488_SEL);
129 spi_open(SPIM, ILI9488_SEL);
130 spi_writen(SPIM, &
cmd, 1);
132 spi_readn(SPIM, pbuffer, numbytes);
133 spi_close(SPIM, ILI9488_SEL);
154 spi_open(SPIM, ILI9488_SEL);
155 spi_writen(SPIM, &
cmd, 1);
165 spi_readn(SPIM, &readword, 3);
166 spi_close(SPIM, ILI9488_SEL);
186 spi_open(SPIM, ILI9488_SEL);
187 spi_writen(SPIM, &
cmd, 1);
197 spi_readn(SPIM, &readword, 4);
198 spi_close(SPIM, ILI9488_SEL);
208void EVE_ILI9488_bootup()
211#define pad_pwd pad_gpio43
212#elif defined(FT93X_PLATFORM)
213#define pad_pwd pad_gpio15
216 gpio_function(GPIO_SPIM_CLK, pad_spim_sck);
217 gpio_function(GPIO_SPIM_SS0, pad_spim_ss0);
218 gpio_function(GPIO_SPIM_MOSI, pad_spim_mosi);
219 gpio_function(GPIO_SPIM_MISO, pad_spim_miso);
220 gpio_function(GPIO_ILI9488_DCX, pad_ili9488_dcx);
221 gpio_function(GPIO_ILI9488_CS1, pad_ili9488_cs1);
223 gpio_function(GPIO_FT800_PWD, pad_pwd);
225 gpio_dir(GPIO_ILI9488_DCX, pad_dir_output);
226 gpio_dir(GPIO_ILI9488_CS1, pad_dir_output);
228 gpio_dir(GPIO_FT800_PWD, pad_dir_output);
230 gpio_write(GPIO_ILI9488_DCX, 1);
231 gpio_write(GPIO_SPIM_SS0, 1);
232 gpio_write(GPIO_ILI9488_CS1, 1);
233 gpio_write(GPIO_FT800_PWD, 1);
237 sys_enable(sys_device_spi_master);
238 spi_init(SPIM, spi_dir_master, spi_mode_0, 64);
239 spi_option(SPIM, spi_option_fifo_size, 16);
240 spi_option(SPIM, spi_option_fifo, 1);
241 spi_option(SPIM, spi_option_bus_width, 1);
249 ILI9488_SPI_WriteCmd(ILI9488_CMD_SOFTWARE_RESET, 0);
257 ILI9488_SPI_WriteCmdN(ILI9488_CMD_COLOMNADDR, 4, arraytemp);
264 ILI9488_SPI_WriteCmdN(ILI9488_CMD_ROWADDR, 4, arraytemp);
267 ILI9488_SPI_WriteCmd(ILI9488_CMD_FRAME_RATE_CONTROL, 0xB0);
274 ILI9488_SPI_WriteCmdN(0XF7, 4, arraytemp);
276 ILI9488_SPI_WriteCmd(ILI9488_CMD_INTERFACE_MODE_CONTROL, 2);
277 ILI9488_SPI_WriteCmd(ILI9488_CMD_INTERFACE_PIXEL_FORMAT, ILI9488_INTERFACE_PIXEL_FORMAT_18BIT_DPI);
278 ILI9488_SPI_WriteCmd(ILI9488_CMD_IMAGEFUNCTION, 0);
279 ILI9488_SPI_WriteCmd(ILI9488_CMD_WRITE_CONTROL_DISPLAY, 0x2c);
281 ILI9488_SPI_WriteCmd(ILI9488_CMD_MADCTRL, 0x48);
287 ILI9488_SPI_WriteCmdN(ILI9488_CMD_DISPLAY_FUNCTION_CONTROL, 3, arraytemp);
289 ILI9488_SPI_WriteCmd(ILI9488_CMD_SLEEP_OUT, 0);
292 ILI9488_SPI_WriteCmd(ILI9488_CMD_DISPLAYON, 0);
293 ILI9488_SPI_WriteCmd(0x2c, 0xB0);
static ft_void_t ft_uint32_t * cmd