summaryrefslogtreecommitdiffstats
path: root/pressure_control/firmware/valves.c
diff options
context:
space:
mode:
Diffstat (limited to 'pressure_control/firmware/valves.c')
-rw-r--r--pressure_control/firmware/valves.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/pressure_control/firmware/valves.c b/pressure_control/firmware/valves.c
index ec15518..034dc99 100644
--- a/pressure_control/firmware/valves.c
+++ b/pressure_control/firmware/valves.c
@@ -85,9 +85,19 @@ uint8_t valves_get_global_state(void)
return current_global_state;
}
-void valves_init(void)
+static inline void valves_ddr_setup(void)
{
VALVE_DDR |= (1 << VALVE0_12) | (1 << VALVE0_14) |
(1 << VALVE1_12) | (1 << VALVE1_14);
+}
+
+void valves_emergency_state(void)
+{
+ valves_init();
+}
+
+void valves_init(void)
+{
+ valves_ddr_setup();
valves_global_switch(VALVES_IDLE);
}
bues.ch cgit interface