Checkpoint
This commit is contained in:
54 files changed
+6855
-526
No files matched your search
@@ -0,0 +1,96 @@
|
||||
package st7789
|
||||
|
||||
// Registers
|
||||
const (
|
||||
NOP = 0x00
|
||||
SWRESET = 0x01
|
||||
RDDID = 0x04
|
||||
RDDST = 0x09
|
||||
SLPIN = 0x10
|
||||
SLPOUT = 0x11
|
||||
PTLON = 0x12
|
||||
NORON = 0x13
|
||||
INVOFF = 0x20
|
||||
INVON = 0x21
|
||||
DISPOFF = 0x28
|
||||
DISPON = 0x29
|
||||
CASET = 0x2A
|
||||
RASET = 0x2B
|
||||
RAMWR = 0x2C
|
||||
RAMRD = 0x2E
|
||||
PTLAR = 0x30
|
||||
COLMOD = 0x3A
|
||||
MADCTL = 0x36
|
||||
MADCTL_MY = 0x80
|
||||
MADCTL_MX = 0x40
|
||||
MADCTL_MV = 0x20
|
||||
MADCTL_ML = 0x10
|
||||
MADCTL_RGB = 0x00
|
||||
MADCTL_BGR = 0x08
|
||||
MADCTL_MH = 0x04
|
||||
RDID1 = 0xDA
|
||||
RDID2 = 0xDB
|
||||
RDID3 = 0xDC
|
||||
RDID4 = 0xDD
|
||||
FRMCTR1 = 0xB1
|
||||
RGBCTRL = 0xB1
|
||||
FRMCTR2 = 0xB2
|
||||
PORCTRL = 0xB2
|
||||
FRMCTR3 = 0xB3
|
||||
INVCTR = 0xB4
|
||||
DISSET5 = 0xB6
|
||||
PWCTR1 = 0xC0
|
||||
PWCTR2 = 0xC1
|
||||
PWCTR3 = 0xC2
|
||||
PWCTR4 = 0xC3
|
||||
PWCTR5 = 0xC4
|
||||
VMCTR1 = 0xC5
|
||||
FRCTRL2 = 0xC6
|
||||
PWCTR6 = 0xFC
|
||||
GMCTRP1 = 0xE0
|
||||
GMCTRN1 = 0xE1
|
||||
GSCAN = 0x45
|
||||
VSCRDEF = 0x33
|
||||
VSCRSADD = 0x37
|
||||
)
|
||||
|
||||
const (
|
||||
MAX_VSYNC_SCANLINES = 254
|
||||
defaultWidth = 240
|
||||
defaultHeight = 240
|
||||
)
|
||||
|
||||
const (
|
||||
// Allowable frame rate codes for FRCTRL2 (Identifier is in Hz)
|
||||
FrameRate111 FrameRate = 0x01
|
||||
FrameRate105 FrameRate = 0x02
|
||||
FrameRate99 FrameRate = 0x03
|
||||
FrameRate94 FrameRate = 0x04
|
||||
FrameRate90 FrameRate = 0x05
|
||||
FrameRate86 FrameRate = 0x06
|
||||
FrameRate82 FrameRate = 0x07
|
||||
FrameRate78 FrameRate = 0x08
|
||||
FrameRate75 FrameRate = 0x09
|
||||
FrameRate72 FrameRate = 0x0A
|
||||
FrameRate69 FrameRate = 0x0B
|
||||
FrameRate67 FrameRate = 0x0C
|
||||
FrameRate64 FrameRate = 0x0D
|
||||
FrameRate62 FrameRate = 0x0E
|
||||
FrameRate60 FrameRate = 0x0F // 60 is default
|
||||
FrameRate58 FrameRate = 0x10
|
||||
FrameRate57 FrameRate = 0x11
|
||||
FrameRate55 FrameRate = 0x12
|
||||
FrameRate53 FrameRate = 0x13
|
||||
FrameRate52 FrameRate = 0x14
|
||||
FrameRate50 FrameRate = 0x15
|
||||
FrameRate49 FrameRate = 0x16
|
||||
FrameRate48 FrameRate = 0x17
|
||||
FrameRate46 FrameRate = 0x18
|
||||
FrameRate45 FrameRate = 0x19
|
||||
FrameRate44 FrameRate = 0x1A
|
||||
FrameRate43 FrameRate = 0x1B
|
||||
FrameRate42 FrameRate = 0x1C
|
||||
FrameRate41 FrameRate = 0x1D
|
||||
FrameRate40 FrameRate = 0x1E
|
||||
FrameRate39 FrameRate = 0x1F
|
||||
)
|
||||
Reference in new issue
Block a user