You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As explained in issue #206, the code here is doing the calculation
completely wrong. This leads to a multi-second startup delay instead of
just a few clock cycles.
Fix this by using the correct calculation; currently only ADC clock
configurations synchronous to the AHB are supported which makes this
quite easy: We just need to delay the given number of cycles * the
selected ADC clock prescaler (1, 2, or 4).
To make this code future proof against an implementation of asynchronous
ADC clock configurations, use a `match` statement here which will fail
to compile once the `ASYNCHRONOUS` variant is added to the `CkMode`
struct - thus forcing the implementor to take another look at this.
Fixes: #206
0 commit comments