-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevice.yml
128 lines (103 loc) · 5.05 KB
/
device.yml
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
---
name: st7272a
category: Device/Display
description: Display driver IC
datasheet: https://www.crystalfontz.com/controllers/Sitronix/ST7272A/458/
mfr: Sitronix
prefix: st7272a #prefix used in code generation
bus: I2C, SPI # defines the buses that can be used to access registers
i2c_addr: 0x3C # defines the I2C device address (if device uses I2C)
###########################################################################################################
# REGISTERS #
###########################################################################################################
registers:
- DISP_CTRL: { addr: 0x10 , type: uint8_t, perm: rw, default: 0x08, desc: Display Control}
- CONTRAST: { addr: 0x11 , type: uint8_t, perm: rw, default: 0x40, desc: Contrast}
- SUB_CONTRAST_R: { addr: 0x12 , type: uint8_t, perm: rw, default: 0x40, desc: Contrast sub R}
- SUB_CONTRAST_B: { addr: 0x13 , type: uint8_t, perm: rw, default: 0x40, desc: Contrast sub B}
- BRIGHTNESS: { addr: 0x14 , type: uint8_t, perm: rw, default: 0x40, desc: Brightness}
- SUB_BRIGHTNESS_R: { addr: 0x15 , type: uint8_t, perm: rw, default: 0x40, desc: Brightness R}
- SUB_BRIGHTNESS_B: { addr: 0x16 , type: uint8_t, perm: rw, default: 0x40, desc: Brightness B}
- H_BLANKING: { addr: 0x17 , type: uint8_t, perm: rw, default: 0x40, desc: Brightness B}
- V_BLANKING: { addr: 0x18 , type: uint8_t, perm: rw, default: 0x40, desc: Brightness B}
- DISPLAY_MODE: { addr: 0x19 , type: uint8_t, perm: rw, default: 0x6D, desc: Display Mode settings}
- BIST_FNCTN_SETTING: { addr: 0x1C , type: uint8_t, perm: rw, default: 0x38, desc: BIST Fumction Setting}
###########################################################################################################
# Fields #
###########################################################################################################
fields:
- DISP_CTRL:
- GRB: {bit: 3, desc: Resets all register settings}
- DISP:
bit: 0
desc: Display Mode
values:
- NORMAL: {val: 1, desc: Normal display mode }
- STANDBY: {val: 0, desc: Standby mode }
- DISPLAY_MODE: #create flags and fields in the DUMMY register
- MVA_TN:
bit: 7
desc: TN v VA mode select
values:
- TN: {val: 0, desc: TN mode}
- VA: {val: 1, desc: VA mode}
- VDIR:
bit: 6
desc: Vertical Scan Direction
values:
- B2T: {val: 0, desc: Bottom To Top}
- T2B: {val: 1, desc: Top to bottom}
- HDIR:
bit: 5
desc: Horizontal Scan Direction
values:
- R2L: {val: 0, desc: Right to left}
- L2R: {val: 1, desc: Left to Right}
- VDPOL:
bit: 3
desc: VSYNC Polarity
values:
- POS: {val: 0, desc: Positive Polarity}
- NEG: {val: 1, desc: Negative Polarity}
- HDPOL:
bit: 2
desc: HSYNC Polarity
values:
- POS: {val: 0, desc: Positive Polarity}
- NEG: {val: 1, desc: Positive Polarity}
- DEPOL:
bit: 1
desc: DE Polarity
values:
- POS: {val: 0, desc: Positive Polarity}
- NEG: {val: 1, desc: Positive Polarity}
- DCLKPOL:
bit: 0
desc: DCLK Polarity
values:
- POS: {val: 0, desc: Positive Polarity}
- NEG: {val: 1, desc: Positive Polarity}
- BIST_FNCTN_SETTING:
- PICSEC:
mask: 0x60
desc: Time interval of test pattern
values:
- 500MS: {val: 0, desc: 500 ms}
- 1000MS: {val: 1, desc: 1000 ms}
- 1500MS: {val: 2, desc: 1500 ms}
- 2000MS: {val: 3, desc: 2000 ms}
- AUTOBIST: {bit: 3, desc: Auto display pattern control in the BIST mode }
###########################################################################################################
# Preset Configs #
###########################################################################################################
configs:
- default:
desc: Standard setup
registers:
- DISP_CTRL: {DISP: STANDBY, GRB: 0, delay: 100}
- DISP_CTRL: {DISP: NORMAL, GRB: 1}
- flip:
desc: Standard setup
registers:
- DISP_CTRL: {DISP: STANDBY, GRB: 0, delay: 100}
- DISP_CTRL: {DISP: NORMAL, GRB: 1}