diff --git a/drivers/lcd/lcd.c b/drivers/lcd/lcd.c index afeb630446..098c877b5f 100644 --- a/drivers/lcd/lcd.c +++ b/drivers/lcd/lcd.c @@ -429,6 +429,14 @@ void lcd_ll_release(lcd_t *dev) void lcd_ll_write_cmd(lcd_t *dev, uint8_t cmd, const uint8_t *data, size_t len) { + DEBUG("[%s] command 0x%02x (%u) ", __func__, cmd, len); + if (IS_USED(ENABLE_DEBUG) && len) { + for (uint8_t i = 0; i < len; i++) { + DEBUG("0x%02x ", data[i]); + } + } + DEBUG("\n"); + lcd_ll_cmd_start(dev, cmd, len ? true : false); if (len) { lcd_ll_write_bytes(dev, false, data, len); @@ -443,6 +451,13 @@ void lcd_ll_read_cmd(lcd_t *dev, uint8_t cmd, uint8_t *data, size_t len) lcd_ll_cmd_start(dev, cmd, true); lcd_ll_read_bytes(dev, false, data, len); + + if (IS_USED(ENABLE_DEBUG) && len) { + for (uint8_t i = 0; i < len; i++) { + DEBUG("0x%02x ", data[i]); + } + } + DEBUG("\n"); } int lcd_init(lcd_t *dev, const lcd_params_t *params)