Code formatted
This commit is contained in:
parent
c099bb3a53
commit
7633963ea7
1 changed files with 4 additions and 2 deletions
|
@ -32,9 +32,11 @@ void ADC_Sampling(uint16_t *i2s_buff){
|
|||
}
|
||||
*/
|
||||
void ADC_Sampling(uint16_t *i2s_buff){
|
||||
size_t bytes_read; for (int i = 0; i < B_MULT; i++) {
|
||||
size_t bytes_read;
|
||||
for (int i = 0; i < B_MULT; i++) {
|
||||
i2s_read(I2S_NUM_0, (void*)&i2s_buff[i * NUM_SAMPLES], NUM_SAMPLES * sizeof(uint16_t), &bytes_read, portMAX_DELAY);
|
||||
for(size_t ix = 0; ix < bytes_read/2; ix++) i2s_buff[(i * NUM_SAMPLES) + ix] &= 0x0FFF; // 16bit to 12bit conversion
|
||||
for(size_t ix = 0; ix < bytes_read/2; ix++)
|
||||
i2s_buff[(i * NUM_SAMPLES) + ix] &= 0x0FFF; // 16bit to 12bit conversion
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue