summaryrefslogtreecommitdiffstats
path: root/pressure_control/firmware/valves.c
diff options
context:
space:
mode:
authormb <mb@frink.(none)>2009-04-18 17:06:54 +0200
committermb <mb@frink.(none)>2009-04-18 17:06:54 +0200
commit42077af0734b747c5e2311b3b7186537b72cecdb (patch)
tree48fdfac1bec9e6fe775e3771f1aa13372eb14e40 /pressure_control/firmware/valves.c
parent3797d749f174d3bcf04d921c23e076fd7d592335 (diff)
downloadcnc-42077af0734b747c5e2311b3b7186537b72cecdb.tar.xz
cnc-42077af0734b747c5e2311b3b7186537b72cecdb.zip
Turn off the device, if the control tool is shutdown
Signed-off-by: mb <mb@frink.(none)>
Diffstat (limited to 'pressure_control/firmware/valves.c')
-rw-r--r--pressure_control/firmware/valves.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/pressure_control/firmware/valves.c b/pressure_control/firmware/valves.c
index 034dc99..75d4606 100644
--- a/pressure_control/firmware/valves.c
+++ b/pressure_control/firmware/valves.c
@@ -91,6 +91,14 @@ static inline void valves_ddr_setup(void)
(1 << VALVE1_12) | (1 << VALVE1_14);
}
+void valves_shutdown(void)
+{
+ valves_global_switch(VALVES_FLOW_OUT);
+ valve_wait_toggle();
+ valve0_switch(VALVE_STATE_IDLE);
+ valve1_switch(VALVE_STATE_IDLE);
+}
+
void valves_emergency_state(void)
{
valves_init();
bues.ch cgit interface