State machine

http://gameprogrammingpatterns.com/state.html

https://www.norwegiancreations.com/2017/03/state-machines-and-arduino-implementation/

https://www.state-machine.com/, https://www.youtube.com/watch?v=O0Z1D6p7J5A&list=PLPW8O6W-1chwyTzI3BHwBLbGQoPFxPAPM&index=19

https://aticleworld.com/state-machine-using-c/

https://www.embedded.com/design/prototyping-and-development/4442212/Implementing-finite-state-machines-in-embedded-systems

Moore
http://web.archive.org/web/20160517005245/http://www.gedan.net/2008/09/08/finite-state-machine-matrix-style-c-implementation

http://web.archive.org/web/20160808120758/http://www.gedan.net/2009/03/18/finite-state-machine-matrix-style-c-implementation-function-pointers-addon/

snippets
https://contrarymotion.net/2008/02/12/some-code-snippets-for-a-simple-c-state-machine/

ragel
http://www.colm.net/open-source/ragel/

wikipedia
https://en.wikipedia.org/wiki/Event-driven_finite-state_machine

https://en.wikipedia.org/wiki/State_transition_table

books
Mark A. DeLoura, Game programming gems

pointers
https://stackoverflow.com/questions/1371460/state-machines-tutorials

structured
https://www.codeproject.com/Articles/37037/Macros-to-simulate-multi-tasking-blocking-code-at#_Toc310 This is a set of macros that can be used to write structured code as if it were blocking code while in an interrupt context. See Gentlenav UAV project, plain c code and interrupt driven, avoids the category error or category mistake that is Oop.

links
AtmelMicro

Chibios