From 283d6fd11e632a006069e8941e1d851f95de8a06 Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Tue, 29 Oct 2024 04:24:33 -0600 Subject: [PATCH] Revert one change from a prev commit - Got overzealous on 24-bit changes. This one is not required. --- src/NRF52840/AutoAnalogAudio.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/NRF52840/AutoAnalogAudio.cpp b/src/NRF52840/AutoAnalogAudio.cpp index 6cbc65b..6967ba6 100644 --- a/src/NRF52840/AutoAnalogAudio.cpp +++ b/src/NRF52840/AutoAnalogAudio.cpp @@ -765,11 +765,7 @@ void AutoAnalog::set_callback(void(*function)(uint16_t *buf, uint32_t buf_len)){ void AutoAnalog::adcCallback(uint16_t *buf, uint32_t buf_len){ - uint8_t multiplier = 2; - if( NRF_I2S->CONFIG.SWIDTH == I2S_CONFIG_SWIDTH_SWIDTH_24BIT << I2S_CONFIG_SWIDTH_SWIDTH_Pos){ - multiplier = 4; - } - memcpy(adcBuffer16, buf, buf_len * multiplier); + memcpy(adcBuffer16, buf, buf_len * 2); adcReady = true; }