summaryrefslogtreecommitdiffstats
path: root/pressure_control/firmware/valves.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2008-10-23 19:37:14 +0200
committerMichael Buesch <mb@bu3sch.de>2008-10-23 19:37:14 +0200
commit55e576638e744b34021de662f0e8f4d9f5bbf6fd (patch)
tree4f64674ff5ed84510d25b9abda23b8daf0dc91ca /pressure_control/firmware/valves.c
parent89b80bc2ae9a06f029beea7f62bae11b274de3e9 (diff)
downloadcnc-55e576638e744b34021de662f0e8f4d9f5bbf6fd.tar.xz
cnc-55e576638e744b34021de662f0e8f4d9f5bbf6fd.zip
pressure_control: Add manual valve switching.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Diffstat (limited to 'pressure_control/firmware/valves.c')
-rw-r--r--pressure_control/firmware/valves.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/pressure_control/firmware/valves.c b/pressure_control/firmware/valves.c
index f77d8b2..70a2b6a 100644
--- a/pressure_control/firmware/valves.c
+++ b/pressure_control/firmware/valves.c
@@ -31,14 +31,8 @@
#define VALVE1_14 6 /* Pin for valve-1 position 14 */
#define VALVE1_12 7 /* Pin for valve-1 position 12 */
-/* State for one valve. */
-enum valve_state {
- VALVE_STATE_12,
- VALVE_STATE_14,
-};
-
-static void valve0_switch(uint8_t state)
+void valve0_switch(uint8_t state)
{
VALVE_PORT &= ~((1 << VALVE0_12) | (1 << VALVE0_14));
if (state == VALVE_STATE_12)
@@ -47,7 +41,7 @@ static void valve0_switch(uint8_t state)
VALVE_PORT |= (1 << VALVE0_14);
}
-static void valve1_switch(uint8_t state)
+void valve1_switch(uint8_t state)
{
VALVE_PORT &= ~((1 << VALVE1_12) | (1 << VALVE1_14));
if (state == VALVE_STATE_12)
bues.ch cgit interface