diff --git a/src/lcd.c b/src/lcd.c index e79422f..ee18824 100644 --- a/src/lcd.c +++ b/src/lcd.c @@ -68,9 +68,7 @@ void lcd_set_cursor(struct lcd_t *lcd, const uint8_t row, const uint8_t col) { } void lcd_set_custom_char(struct lcd_t *lcd, const uint8_t index, const lcd_glyph_t *glyph) { - uint8_t cmdbuf[] = {254, 78, index, 0, 0, 0, 0, 0, 0, 0, 0}; - memcpy(&cmdbuf[3], glyph, sizeof(lcd_glyph_t)); - memcpy(lcd->writebuf.cchar[index], cmdbuf, sizeof(cmdbuf)); + memcpy(lcd->writebuf.cchar[index] + 3, glyph, sizeof(lcd_glyph_t)); // we prepare the command in init, so we can just copy the glyph after the command } /* writes string to write buffer at calculated pos, we trust it to be null terminated */