Created
October 13, 2018 18:58
-
-
Save ayjayt/120281b87200a594c0a9027d370fafef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define OFF 0 | |
#define START 1 | |
#define PROCESS_ONE 2 | |
#define PROCESS_TWO 3 | |
#define END 4 | |
uint8_t state; | |
if (state == OFF) // etc | |
/ ************************* | |
* OR | |
*************************** / | |
enum state_t { | |
OFF = 0, | |
START, | |
PROCESS_ONE, | |
PROCESS_TWO, | |
END | |
}; | |
state_t state; | |
if (state == OFF) // etc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment