Embedded Systems State Machines & Data Structures