summaryrefslogtreecommitdiff
path: root/ports/stm32/adc.c
diff options
context:
space:
mode:
authoryn386 <wf.yn386@gmail.com>2022-09-19 10:14:27 +0900
committerDamien George <damien@micropython.org>2022-11-18 14:25:19 +1100
commita74e4fabeb0d7bc4dc68284047248fa173f5237b (patch)
tree073d0f8ecdca49e6563c554902b8e8da87c1152c /ports/stm32/adc.c
parent65d82066a8267d7dd96d747d09f9ed3883d40078 (diff)
stm32/i2c: Fix I2C frequency calc so it doesn't exceed requested rate.
Prior to this commit, the actual I2C frequency can be faster than specified one and it may exceed the I2C's specification for Fast Mode. The frequency of SCL should be less than or equal to 400KHz in Fast Mode. This commit fixes this issue for F4 MCUs by rounding up the division in the frequency calculation.
Diffstat (limited to 'ports/stm32/adc.c')
0 files changed, 0 insertions, 0 deletions