Commit 2bb5b88
committed
PDM: fix setGain() for dfsdm
If the gain was too high, the right bit shift
RecBuff[i] >> attenuation
would result in undefined behaviour
https://www.iso-9899.info/n1570.html#6.5.7
Take the chance to also fix the (approximate) conversion from gain (in dB) to bit shift1 parent a77715f commit 2bb5b88
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
395 | 398 | | |
396 | 399 | | |
397 | 400 | | |
| |||
0 commit comments