forked from nanoframework/nanoFramework.IoT.Device
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpenLcdCommandEnum.cs
175 lines (144 loc) · 4.67 KB
/
OpenLcdCommandEnum.cs
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace Iot.Device.SparkFunLcd
{
using System;
using System.Device.I2c;
using System.Drawing;
using System.Threading;
using Iot.Device.CharacterLcd;
/// <summary>
/// LCD library for SparkFun RGB Serial Open LCD display (sizes 20x4 or 16x2) with I2C connection
/// for product information see https://www.sparkfun.com/products/16398
/// code based on https://github.com/sparkfun/OpenLCD.
/// </summary>
public partial class SparkFunLcd
{
/// <summary>
/// OpenLCD device command.
/// </summary>
private enum OpenLcdCommandEnum : byte
{
/// <summary>
/// Special command message, command follows.
/// </summary>
SpecialCommand = 0xfe,
/// <summary>
/// Settings command message, settings detail follows.
/// </summary>
SettingCommand = 0x7C,
/// <summary>
/// Clear and home the display.
/// </summary>
ClearCommand = 0x2D,
/// <summary>
/// Change the contrast setting.
/// </summary>
ContrastCommand = 0x18,
/// <summary>
/// Change the I2C address.
/// </summary>
AddressCommand = 0x19,
/// <summary>
/// Set backlight RGB value.
/// </summary>
SetRgbCommand = 0x2B,
/// <summary>
/// Enable system messages to be displayed.
/// </summary>
EnableSystemMessageDisplay = 0x2E,
/// <summary>
/// Disable system messages from being displayed.
/// </summary>
DisableSystemMessageDisplay = 0x2F,
/// <summary>
/// Enable splash screen at power on.
/// </summary>
EnableSplashDisplay = 0x30,
/// <summary>
/// Disable splash screen at power on.
/// </summary>
DisableSpashDisplay = 0x31,
/// <summary>
/// Save current text on display as splash screen.
/// </summary>
SaveCurrentDisplayAsSplash = 0x0A,
/// <summary>
/// Return cursor home.
/// </summary>
ReturnHome = 0x02,
/// <summary>
/// Entry mode command.
/// </summary>
EntryModeSet = 0x04,
/// <summary>
/// Display Control Command.
/// </summary>
DisplayControl = 0x08,
/// <summary>
/// Cursor Shift Command.
/// </summary>
CursorShift = 0x10,
/// <summary>
/// Set DDRAM Address.
/// </summary>
SetDdramAddress = 0x80,
/// <summary>
/// Enable right entry auto-scroll.
/// </summary>
EntryRight = 0x00,
/// <summary>
/// Enable left entry auto-scroll.
/// </summary>
EntryLeft = 0x02,
/// <summary>
/// Auto-scroll per character increment command.
/// </summary>
EntryShiftIncrement = 0x01,
/// <summary>
/// Auto-Scroll per character decrement command.
/// </summary>
EntryShiftDecrement = 0x00,
/// <summary>
/// Display ON Command.
/// </summary>
DisplayOn = 0x04,
/// <summary>
/// Display OFF Command.
/// </summary>
DisplayOff = 0x00,
/// <summary>
/// Cursor ON.
/// </summary>
CursorOn = 0x02,
/// <summary>
/// Cursor OFF.
/// </summary>
CursorOff = 0x00,
/// <summary>
/// Cursor blink ON Command.
/// </summary>
BlinkOn = 0x01,
/// <summary>
/// Cursor blink OFF Command.
/// </summary>
BlinkOff = 0x00,
/// <summary>
/// Display Move Command.
/// </summary>
DisplayMove = 0x08,
/// <summary>
/// Cursor Move Command.
/// </summary>
CursorMove = 0x00,
/// <summary>
/// Move Right Command.
/// </summary>
MoveRight = 0x04,
/// <summary>
/// Move Left Command.
/// </summary>
MoveLeft = 0x00
}
}
}