-
Notifications
You must be signed in to change notification settings - Fork 7
/
ILI9340.py
63 lines (51 loc) · 1.13 KB
/
ILI9340.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# ILI9340 commands
ILI9340_NOP = 0x00
ILI9340_SWRESET = 0x01
ILI9340_RDDID = 0x04
ILI9340_RDDST = 0x09
ILI9340_SLPIN = 0x10
ILI9340_SLPOUT = 0x11
ILI9340_PTLON = 0x12
ILI9340_NORON = 0x13
ILI9340_RDMODE = 0x0A
ILI9340_RDMADCTL = 0x0B
ILI9340_RDPIXFMT = 0x0C
ILI9340_RDIMGFMT = 0x0A
ILI9340_RDSELFDIAG = 0x0F
ILI9340_INVOFF = 0x20
ILI9340_INVON = 0x21
ILI9340_GAMMASET = 0x26
ILI9340_DISPOFF = 0x28
ILI9340_DISPON = 0x29
ILI9340_CASET = 0x2A
ILI9340_PASET = 0x2B
ILI9340_RAMWR = 0x2C
ILI9340_RAMRD = 0x2E
ILI9340_PTLAR = 0x30
ILI9340_MADCTL = 0x36
ILI9340_MADCTL_MY = 0x80
ILI9340_MADCTL_MX = 0x40
ILI9340_MADCTL_MV = 0x20
ILI9340_MADCTL_ML = 0x10
ILI9340_MADCTL_RGB = 0x00
ILI9340_MADCTL_BGR = 0x08
ILI9340_MADCTL_MH = 0x04
ILI9340_PIXFMT = 0x3A
ILI9340_FRMCTR1 = 0xB1
ILI9340_FRMCTR2 = 0xB2
ILI9340_FRMCTR3 = 0xB3
ILI9340_INVCTR = 0xB4
ILI9340_DFUNCTR = 0xB6
ILI9340_PWCTR1 = 0xC0
ILI9340_PWCTR2 = 0xC1
ILI9340_PWCTR3 = 0xC2
ILI9340_PWCTR4 = 0xC3
ILI9340_PWCTR5 = 0xC4
ILI9340_VMCTR1 = 0xC5
ILI9340_VMCTR2 = 0xC7
ILI9340_RDID1 = 0xDA
ILI9340_RDID2 = 0xDB
ILI9340_RDID3 = 0xDC
ILI9340_RDID4 = 0xDD
ILI9340_GMCTRP1 = 0xE0
ILI9340_GMCTRN1 = 0xE1