by scoutt · 3y ago · 0 comments
State machines to deal with interrupts (to name the most basic kind of async event) is the ABC of embedded "bare metal" programming.
Whether async/await is cleaner, easier, readable, etc. is a matter of taste.
> you have to do that yourself
Yes. And it has a cost. Plus the cost of executing that state machine (changing states, etc.), which is hidden from you.
One can always pull a more optimized and fine-tuned state machine made by hand (sitting on WFI for example), and here comes the "taste" factor.