werent using this anyway
This commit is contained in:
@@ -22,8 +22,6 @@ void lcd_set_contrast(struct lcd_t *lcd, uint8_t contrast);
|
||||
void lcd_set_backlight(struct lcd_t *lcd, bool enabled);
|
||||
void lcd_set_cursor(struct lcd_t *lcd, uint8_t row, uint8_t col);
|
||||
void lcd_set_custom_char(struct lcd_t *lcd, uint8_t index, const lcd_glyph_t *glyph);
|
||||
void lcd_write_str(struct lcd_t *lcd, const char *str, uint8_t len);
|
||||
void lcd_write_str_pos(struct lcd_t *lcd, const char *str, uint8_t len, uint8_t posX, uint8_t posY);
|
||||
void lcd_write_buf(struct lcd_t *lcd, uint8_t row, uint8_t col, const char *str);
|
||||
void lcd_writef(struct lcd_t *lcd, uint8_t x, uint8_t y, const char *fmt, ...) __attribute__((format(printf, 4, 5)));
|
||||
void lcd_clear_buf(struct lcd_t *lcd);
|
||||
|
||||
11
src/lcd.c
11
src/lcd.c
@@ -29,6 +29,7 @@ void lcd_close(struct lcd_t *lcd) {
|
||||
}
|
||||
|
||||
void lcd_write(struct lcd_t *lcd, const uint8_t *cmdbuf, const uint8_t len) {
|
||||
applog(LOG_INF, "wrote %d bytes", len);
|
||||
if (write(lcd->fd, cmdbuf, len) <= 0) {
|
||||
applog(LOG_ERR, "failed to execute write(), lost access to port?");
|
||||
lcd_close(lcd);
|
||||
@@ -65,16 +66,6 @@ void lcd_set_custom_char(struct lcd_t *lcd, const uint8_t index, const lcd_glyph
|
||||
lcd_write(lcd, cmdbuf, sizeof(cmdbuf));
|
||||
}
|
||||
|
||||
/* immediately writes string to the lcd at current cursor pos */
|
||||
void lcd_write_str(struct lcd_t *lcd, const char *str, const uint8_t len) {
|
||||
lcd_write(lcd, (const uint8_t *)str, len);
|
||||
}
|
||||
|
||||
void lcd_write_str_pos(struct lcd_t *lcd, const char *str, const uint8_t len, const uint8_t posX, const uint8_t posY) {
|
||||
lcd_set_cursor(lcd, posX, posY);
|
||||
lcd_write(lcd, (const uint8_t *)str, len);
|
||||
}
|
||||
|
||||
/* writes string to write buffer at calculated pos, we trust it to be null terminated */
|
||||
void lcd_write_buf(struct lcd_t *lcd, const uint8_t row, const uint8_t col, const char *str) {
|
||||
size_t len = 0;
|
||||
|
||||
Reference in New Issue
Block a user