This is likely the case with a few other peripherals as well, but I encountered it with the TimerHandle
When testing reusing TIM2 (which is used by System internally):
I attempted to call Init without anything first, this (somewhat expectedly) failed since the timer was running already.
So the next logical step was to call DeInit, before calling Init. This does not work because Init is what assigns the internal Impl class. So any calls prior to Init will fail.
So not necessarily a bug, but a whole in the expected functionality that should be addressed at some point throughout the library.
Should all Init functions do a full DeInit before Init to avoid the necessity?
This is likely the case with a few other peripherals as well, but I encountered it with the TimerHandle
When testing reusing TIM2 (which is used by System internally):
I attempted to call Init without anything first, this (somewhat expectedly) failed since the timer was running already.
So the next logical step was to call
DeInit
, before callingInit
. This does not work becauseInit
is what assigns the internalImpl
class. So any calls prior to Init will fail.So not necessarily a bug, but a whole in the expected functionality that should be addressed at some point throughout the library.
Should all
Init
functions do a full DeInit before Init to avoid the necessity?