summaryrefslogtreecommitdiffstats
path: root/pressure_control/firmware/valves.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2009-04-17 18:29:03 +0200
committerMichael Buesch <mb@bu3sch.de>2009-04-17 18:29:03 +0200
commit4ade0d3b6f545db13d54bad1c2eababfd3f7ee84 (patch)
tree0e225cb5b7fefe864323d72d328d80ff9ff419c8 /pressure_control/firmware/valves.c
parentcae474acff0da74af07cd2194dc694714076d1f0 (diff)
downloadcnc-4ade0d3b6f545db13d54bad1c2eababfd3f7ee84.tar.xz
cnc-4ade0d3b6f545db13d54bad1c2eababfd3f7ee84.zip
pressure_control: Fix bootup
Signed-off-by: Michael Buesch <mb@bu3sch.de>
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