Skip to content

Commit

Permalink
add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hasenradball committed Dec 21, 2023
1 parent 406277e commit 4f71bc1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/LCD-I2C.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@
while the other 4 bits are for the 8 bits of data which are send in parts using the enable output.
*/
struct OutputState {
// Select register
// 0: instruction register
// 1: data register
uint8_t rs = 0;
// select read or write
uint8_t rw = 0;
// Enable: starts data read or write
uint8_t E = 0;
// LED status
uint8_t Led = 0;
uint8_t data = 0;

Expand All @@ -22,7 +28,6 @@ struct OutputState {
buffer |= E << 2;
buffer |= Led << 3;
buffer |= (data & 0x0F) << 4;

return buffer;
}

Expand Down

0 comments on commit 4f71bc1

Please sign in to comment.