summaryrefslogtreecommitdiffstats
path: root/pressure_control/firmware/valves.h
diff options
context:
space:
mode:
Diffstat (limited to 'pressure_control/firmware/valves.h')
-rw-r--r--pressure_control/firmware/valves.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/pressure_control/firmware/valves.h b/pressure_control/firmware/valves.h
index e7a5e74..320505d 100644
--- a/pressure_control/firmware/valves.h
+++ b/pressure_control/firmware/valves.h
@@ -1,6 +1,8 @@
#ifndef VALVES_H_
#define VALVES_H_
+#include "util.h"
+
#include <stdint.h>
@@ -13,12 +15,20 @@ enum valves_global_state {
/* State for one valve. */
enum valve_state {
+ VALVE_STATE_IDLE,
VALVE_STATE_12,
VALVE_STATE_14,
};
+/* Wait for the valve to toggle from one position to another. */
+static inline void valve_wait_toggle(void)
+{
+ mdelay(10);
+}
+
void valves_init(void);
void valves_global_switch(uint8_t global_state);
+uint8_t valves_get_global_state(void);
void valve0_switch(uint8_t state);
void valve1_switch(uint8_t state);
bues.ch cgit interface