From c3b95a62bf869ac1daa0691b99456d39a5d20f9d Mon Sep 17 00:00:00 2001 From: moon2 <moon2protonmail@protonmail.com> Date: Sun, 28 May 2023 17:47:35 +0200 Subject: [PATCH] audio init: clearer error output --- components/badge23/audio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/badge23/audio.c b/components/badge23/audio.c index 539fa3da67..76b130d511 100644 --- a/components/badge23/audio.c +++ b/components/badge23/audio.c @@ -37,9 +37,7 @@ static esp_err_t max98091_i2c_write(const uint8_t reg, const uint8_t data) { const uint8_t tx[] = {reg, data}; esp_err_t ret = i2c_master_write_to_device(I2C_MASTER_NUM, 0x10, tx, sizeof(tx), TIMEOUT_MS / portTICK_PERIOD_MS); - - if(max98091_i2c_read(reg) != data) printf("Write of %04X to %02X apparently failed\n", data, reg); - + if(max98091_i2c_read(reg) != data) printf("readback of %04X to %02X write failed\n", data, reg); return ret; } @@ -113,6 +111,7 @@ static void init_codec() ESP_ERROR_CHECK(max98091_i2c_write(0x41, 0x0)); ESP_ERROR_CHECK(max98091_i2c_write(0x3D, 1<<7)); // jack detect enable + printf("4 readbacks failing here is normal dw ^w^"); } static void i2s_init(void){ -- GitLab