From d4d12cc3c1a90a4c293df3de6005289f41443b43 Mon Sep 17 00:00:00 2001 From: Drath Date: Sun, 14 Jun 2026 11:13:27 +0200 Subject: [PATCH] werent using this anyway --- include/lcd.h | 2 -- src/lcd.c | 11 +---------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/include/lcd.h b/include/lcd.h index f536f41..b3dde6c 100644 --- a/include/lcd.h +++ b/include/lcd.h @@ -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); diff --git a/src/lcd.c b/src/lcd.c index 8bcbe86..912843c 100644 --- a/src/lcd.c +++ b/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;