I am using this library in an interrupt in an embedded project. I wanted to take advantage of the fact that static mut can be safely used in interrupt/exception contexts. However I cannot do something like:
because StateMachine::new is not a const function. I have to wrap it in a Option, adding an unnecessary check at each interrupt call. Can something be done to enhance this given that a no-std library like this is going to see a lot of embedded usage?
I am using this library in an interrupt in an embedded project. I wanted to take advantage of the fact that
static mut
can be safely used in interrupt/exception contexts. However I cannot do something like:because StateMachine::new is not a const function. I have to wrap it in a
Option
, adding an unnecessary check at each interrupt call. Can something be done to enhance this given that ano-std
library like this is going to see a lot of embedded usage?