aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-states.h
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-11-11 05:14:47 -0700
committerSelene ToyKeeper2018-11-11 05:14:47 -0700
commite942fa7c47f446891e3bb0a07316d22cc32c00c2 (patch)
treea74c2cbe1a48554f66d8ca18a0dbc1bf0d69ebdc /spaghetti-monster/fsm-states.h
parentcalibrated Sofirn SP36 config (diff)
downloadanduril-e942fa7c47f446891e3bb0a07316d22cc32c00c2.tar.gz
anduril-e942fa7c47f446891e3bb0a07316d22cc32c00c2.tar.bz2
anduril-e942fa7c47f446891e3bb0a07316d22cc32c00c2.zip
Rewrote the event system to use a single byte for each event instead of an array of actions.
Not thoroughly tested yet, not done yet, have only updated Anduril to fit, and only partially.
Diffstat (limited to 'spaghetti-monster/fsm-states.h')
-rw-r--r--spaghetti-monster/fsm-states.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/spaghetti-monster/fsm-states.h b/spaghetti-monster/fsm-states.h
index 6e4a2a0..7d9361b 100644
--- a/spaghetti-monster/fsm-states.h
+++ b/spaghetti-monster/fsm-states.h
@@ -23,7 +23,7 @@
#include "fsm-adc.h"
// typedefs
-typedef uint8_t State(EventPtr event, uint16_t arg);
+typedef uint8_t State(Event event, uint16_t arg);
typedef State * StatePtr;
// top of the stack
@@ -36,12 +36,12 @@ StatePtr state_stack[STATE_STACK_SIZE];
uint8_t state_stack_len = 0;
void _set_state(StatePtr new_state, uint16_t arg,
- EventPtr exit_event, EventPtr enter_event);
+ Event exit_event, Event enter_event);
int8_t push_state(StatePtr new_state, uint16_t arg);
StatePtr pop_state();
uint8_t set_state(StatePtr new_state, uint16_t arg);
#ifndef DONT_USE_DEFAULT_STATE
-uint8_t default_state(EventPtr event, uint16_t arg);
+uint8_t default_state(Event event, uint16_t arg);
#endif
#endif