-
Notifications
You must be signed in to change notification settings - Fork 3
/
commands.go
99 lines (93 loc) · 2.9 KB
/
commands.go
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package epaper
const (
// EPD2IN7 commands
panelSetting = 0x00
powerSetting = 0x01
powerOff = 0x02
powerOffSequenceSetting = 0x03
powerOn = 0x04
powerOnMeasure = 0x05
boosterSoftStart = 0x06
deepSleep = 0x07
dataStartTransmission1 = 0x10
dataStop = 0x11
displayRefresh = 0x12
dataStartTransmission2 = 0x13
partialDataStartTransmission1 = 0x14
partialDataStartTransmission2 = 0x15
partialDisplayRefresh = 0x16
lutForVcom = 0x20
lutWhiteToWhite = 0x21
lutBlackToWhite = 0x22
lutWhiteToBlack = 0x23
lutBlackToBlack = 0x24
pllControl = 0x30
temperatureSensorCommand = 0x40
temperatureSensorCalibration = 0x41
temperatureSensorWrite = 0x42
temperatureSensorRead = 0x43
vcomAndDataIntervalSetting = 0x50
lowPowerDetection = 0x51
tconSetting = 0x60
tconResolution = 0x61
sourceAndGateStartSetting = 0x62
getStatus = 0x71
autoMeasureVcom = 0x80
vcomValue = 0x81
vcmDcSettingRegister = 0x82
programMode = 0xa0
activeProgram = 0xa1
readOtpData = 0xa2
)
var (
lutVcomDC = []byte{
0x00, 0x00,
0x00, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x00, 0x32, 0x32, 0x00, 0x00, 0x02,
0x00, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
}
// R21H
lutWw = []byte{
0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x60, 0x32, 0x32, 0x00, 0x00, 0x02,
0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
}
// R22H r
lutBw = []byte{
0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x60, 0x32, 0x32, 0x00, 0x00, 0x02,
0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
}
// R24H b
lutBb = []byte{
0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x60, 0x32, 0x32, 0x00, 0x00, 0x02,
0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
}
// R23H w
lutWb = []byte{
0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x60, 0x32, 0x32, 0x00, 0x00, 0x02,
0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
}
)