FreeCalypso > hg > freecalypso-hwlab
annotate lcdtest/startek.c @ 71:bac08ce19c08
DUART28C USB ID assigned
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 30 Jul 2020 04:53:27 +0000 |
parents | 94521a02c33d |
children |
rev | line source |
---|---|
20
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
24
94521a02c33d
lcdtest: the truth about Startek and Crystalfontz LCDs
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
2 * ST7775R register init for Startek LCDs KD020C-1 V2 and KD020C-2A, |
94521a02c33d
lcdtest: the truth about Startek and Crystalfontz LCDs
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
3 * the former of which is also sold by Crystalfontz as CFAF176220U-020T. |
20
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 */ |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 |
24
94521a02c33d
lcdtest: the truth about Startek and Crystalfontz LCDs
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
6 init_startek() |
20
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 { |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 /* basic settings */ |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 write_ir(0x01); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 write_dr(0x011C); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 write_ir(0x02); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 write_dr(0x0100); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 write_ir(0x03); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 write_dr(0x1030); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 write_ir(0x0F); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 write_dr(0x0001); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 write_ir(0x10); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 write_dr(0x0000); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 write_ir(0x11); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 write_dr(0x1000); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 /* gamma control registers */ |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 write_ir(0x50); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 write_dr(0x0203); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 write_ir(0x51); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 write_dr(0x0A09); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 write_ir(0x52); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 write_dr(0x0005); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 write_ir(0x53); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 write_dr(0x1021); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 write_ir(0x54); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 write_dr(0x0602); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 write_ir(0x55); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 write_dr(0x0003); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 write_ir(0x56); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 write_dr(0x0703); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 write_ir(0x57); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 write_dr(0x0507); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 write_ir(0x58); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 write_dr(0x1021); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 write_ir(0x59); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 write_dr(0x0703); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 /* VCOM */ |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 write_ir(0xB0); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 write_dr(0x2501); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 /* turn it on! */ |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 write_ir(0x07); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 write_dr(0x1017); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 return(0); |
2e4f27ea7067
lcdtest: init-st command implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 } |