Skip to content

Commit 4b39cc0

Browse files
committed
Final, Dispatch
1 parent f199e66 commit 4b39cc0

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

LICENSE.md renamed to LICENSE

File renamed without changes.

README.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,58 @@ void lcd1602_create_char(lcd1602_t *lcd, uint8_t location, uint8_t *charmap);
3838
Used to create custom chars (Up to 8 memory space available when running 5x8 mode)
3939
`*lcd` - pointer to lcd,
4040
`location` - location in memory (0-7),
41-
`*charmap` - uint8_t[8] array where each index is one row in character bank, (for example 0b010111 -> 0 == block off, 1 == block on)
41+
`*charmap` - uint8_t[8] array where each index is one row in character bank, (for example 0b010111 -> 0 == block off, 1 == block on), see example code
42+
43+
```c
44+
void lcd1602_update_backlight(lcd1602_t *lcd);
45+
```
46+
Used for on/off backlight (before call, set lcd.backlight to either `true` or `false`)
47+
48+
```c
49+
void lcd1602_dcb_set(lcd1602_t *lcd, bool displayon, bool cursoron, bool blinkon);
50+
```
51+
Sets the dcb bits in `lcd1602_t` structure, to apply changes call `lcd1602_dcb_update`
52+
53+
```c
54+
void lcd1602_dcb_update(lcd1602_t *lcd);
55+
```
56+
Updates and applies changes from lcd->dcb to display
57+
58+
```c
59+
void lcd1602_entry_set(lcd1602_t *lcd, bool direction, bool shift);
60+
```
61+
Sets the entry bits in lcd1602_t structure, `direction` -> 0 = right, 1 = left, `shift` -> 0 = Entry shift decrement, 1 = Entry shift increment
62+
63+
```c
64+
void lcd1602_entry_update(lcd1602_t *lcd);
65+
```
66+
Updates and applies entry bits from lcd1602_t to display
67+
68+
```c
69+
void lcd1602_jumptohome(lcd1602_t *lcd);
70+
```
71+
Jumps to home and sets cursor to the original position if shifted
72+
73+
```c
74+
void lcd1602_clear(lcd1602_t *lcd);
75+
```
76+
Clears whole DDRAM (Whole display memory, so nothing will show up, even if shifted)
77+
78+
```c
79+
void lcd1602_rl_shift(lcd1602_t *lcd, uint8_t cur_display, uint8_t direction);
80+
```
81+
Shifts display (showing of DDRAM contents) or cursor to either left or right
82+
`lcd` - pointer to lcd1602_t struct
83+
`cur_display` - cursor (LCD1602_CURSORMOVE) or display (LCD1602_DISPLAYMOVE) shift select
84+
`direction` - direction select: left (LCD1602_MOVELEFT), rght (LCD1602_MOVERIGHT)
85+
86+
```c
87+
void lcd1602_set_pos(lcd1602_t *lcd, uint8_t row, uint8_t col);
88+
```
89+
Sets position of cursor in DDRAM space
90+
`lcd` - pointer to the lcd1602_t struct
91+
`row` - row 0 (first) or 1 (second)
92+
`col` - column select, can be more than 16 because DDRAM is bigger than the display (up to 2^6 = 64, from 0 to 63)
93+
94+
## EXAMPLE PROJECT
95+
Here is example project repo -> https://github.com/mvarchdev/lcd1602_test

0 commit comments

Comments
 (0)