image/svg+xml
Brteve's API for EveApps
Version 0.0.1
The reference document for common folder of EveApps project.
Loading...
Searching...
No Matches
EVE_ILI9488.h
Go to the documentation of this file.
1
32
#ifndef EVE_ILI9488__H
33
#define EVE_ILI9488__H
34
35
#if defined(ENABLE_ILI9488_HVGA_PORTRAIT) || defined(ENABLE_KD2401_HVGA_PORTRAIT)
36
37
/* Macros for ILI driver */
38
39
#define ILI9488_CS_LOW (gpio_write(GPIO_ILI9488_CS1, 0))
40
#define ILI9488_CS_HIGH (gpio_write(GPIO_ILI9488_CS1, 1))
41
#define ILI9488_CLK_LOW (gpio_write(GPIO_SPIM_CLK, 0))
42
#define ILI9488_CLK_HIGH (gpio_write(GPIO_SPIM_CLK, 1))
43
#define ILI9488_MOSI_LOW (gpio_write(GPIO_SPIM_MOSI, 0))
44
#define ILI9488_MOSI_HIGH (gpio_write(GPIO_SPIM_MOSI, 1))
45
#define ILI9488_DCX_LOW (gpio_write(GPIO_ILI9488_DCX, 0))
46
#define ILI9488_DCX_HIGH (gpio_write(GPIO_ILI9488_DCX, 1))
47
48
#define ILI9488_MISO_LOWHIGH (gpio_read(GPIO_SPIM_MISO))
49
50
//ILI9488 commands
51
#define ILI9488_CMD_SOFTWARE_RESET (0x01)
//next new command only after 5ms and sleep commands only after 120ms
52
#define ILI9488_CMD_READ_DISPLAY_IDENTIFICATION (0x04)
53
#define ILI9488_CMD_READ_DISPLAY_POWERMODE (0x0A)
54
#define ILI9488_CMD_READ_MADCTRL (0x0B)
55
#define ILI9488_CMD_READ_PIXEL_FORMAT (0x0C)
56
57
#define ILI9488_READ_DISPLAY_SIGNALMODE (0x0E)
58
59
#define ILI9488_CMD_SLEEP_IN (0x10)
60
#define ILI9488_CMD_SLEEP_OUT (0x11)
61
#define ILI9488_CMD_NORMAL_DISPLAY_ON (0x13)
62
#define ILI9488_CMD_ALLPIXELOFF (0x22)
63
#define ILI9488_CMD_ALLPIXELON (0x23)
64
#define ILI9488_CMD_DISPLAYOFF (0x28)
65
#define ILI9488_CMD_DISPLAYON (0x29)
//need to do this
66
#define ILI9488_CMD_COLOMNADDR (0x2A)
67
#define ILI9488_CMD_ROWADDR (0x2B)
68
#define ILI9488_CMD_TEARINGEFFECT_LINEOFF (0x34)
69
#define ILI9488_CMD_TEARINGEFFECT_LINEON (0x35)
70
71
#define ILI9488_CMD_MADCTRL (0x36)
72
#define ILI9488_CMD_IDLE_OFF (0x38)
73
#define ILI9488_CMD_IDLE_ON (0x39)
74
75
#define ILI9488_CMD_INTERFACE_PIXEL_FORMAT (0x3A)
//default is 06 and DBI 18 bits/pixel
76
#define ILI9488_INTERFACE_PIXEL_FORMAT_18BIT_DPI (0x66)
77
#define ILI9488_INTERFACE_PIXEL_FORMAT_24BIT_DPI (0x70)
78
79
#define ILI9488_CMD_READ_ID1 (0xDA)
80
#define ILI9488_CMD_READ_ID2 (0xDB)
81
#define ILI9488_CMD_READ_ID3 (0xDC)
82
83
#define ILI9488_ID1 (0x54)
84
#define ILI9488_ID2 (0x80)
85
#define ILI9488_ID3 (0x66)
86
87
#define ILI9488_CMD_WRITE_CONTROL_DISPLAY (0x53)
88
#define ILI9488_CMD_WRITE_BRIGHTNESSVALUE (0x51)
89
#define ILI9488_CMD_READ_BRIGHTNESSVALUE (0x52)
90
#define ILI9488_CMD_WRITE_CTRLDISPLAYVALUE (0x53)
91
#define ILI9488_CMD_READ_CTRLDISPLAYVALUE (0x54)
92
93
//extended functions
94
#define ILI9488_CMD_INTERFACE_MODE_CONTROL (0xB0)
95
#define ILI9488_CMD_FRAME_RATE_CONTROL (0xB1)
96
#define ILI9488_CMD_BLANCKING_PORCH_CONTROL (0xB5)
97
#define ILI9488_CMD_DISPLAY_FUNCTION_CONTROL (0xB6)
98
#define ILI9488_CMD_READ_ID4 (0xD3)
99
#define ILI9488_CMD_IMAGEFUNCTION (0xE9)
100
101
#define ILI9488_ID4 (0x00009488L)
102
103
#define ILI9488_CMD_SPI_READCMDSETTINGS (0xFB)
104
105
#ifdef FT9XX_PLATFORM
106
int16_t
ILI9488_SPI_WriteCmd(
uint8_t
cmd
,
uint8_t
data);
107
int16_t
ILI9488_SPI_WriteCmdN(
uint8_t
cmd
,
uint8_t
bytecount,
const
uint8_t
*pbuff);
108
uint8_t
ILI9488_SPI_Read(
uint8_t
cmd
);
109
uint8_t
ILI9488_SPI_ReadN(
uint8_t
cmd
,
uint8_t
numbytes,
const
uint8_t
*pbuffer);
110
uint32_t
ILI9488_SPI_ReadRDDID(
uint8_t
cmd
);
111
uint32_t
ILI9488_SPI_ReadRDDST(
uint8_t
cmd
);
112
void
EVE_ILI9488_bootup();
113
#endif
114
115
#ifdef RP2040_PLATFORM
116
void
EVE_ILI9488_RP2040_bootup(
EVE_HalContext
*phost);
117
int16_t
ILI9488_SPI_WriteCmdN(
EVE_HalContext
*phost,
uint8_t
cmd
,
uint8_t
bytecount,
const
uint8_t
*pbuff);
118
int16_t
ILI9488_SPI_WriteCmd(
EVE_HalContext
*phost,
uint8_t
cmd
,
uint8_t
data);
119
#endif
120
121
#endif
/* ENABLE_ILI9488_HVGA_PORTRAIT */
122
123
#endif
/* EVE_ILI9488__H */
124
125
/* end of file */
uint32_t
unsigned int uint32_t
Definition
EVE_IntTypes_MSVC12.h:42
int16_t
short int16_t
Definition
EVE_IntTypes_MSVC12.h:37
uint8_t
unsigned char uint8_t
Definition
EVE_IntTypes_MSVC12.h:40
cmd
static ft_void_t ft_uint32_t * cmd
Definition
FT_Gpu_Hal.h:184
EVE_HalContext
Definition
EVE_HalDefs.h:233
common
eve_hal
EVE_ILI9488.h
Copyright © Bridgetek Pte Ltd