Skip to content

Commit

Permalink
Revert one change from a prev commit
Browse files Browse the repository at this point in the history
- Got overzealous on 24-bit changes. This one is not required.
  • Loading branch information
TMRh20 committed Oct 29, 2024
1 parent a0d15ba commit 283d6fd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/NRF52840/AutoAnalogAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}
Expand Down

0 comments on commit 283d6fd

Please sign in to comment.