summaryrefslogtreecommitdiffstats
path: root/drivers/haptic/solenoid.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/haptic/solenoid.h')
-rw-r--r--drivers/haptic/solenoid.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/haptic/solenoid.h b/drivers/haptic/solenoid.h
index f2a3bc4c30..653148154f 100644
--- a/drivers/haptic/solenoid.h
+++ b/drivers/haptic/solenoid.h
@@ -49,6 +49,14 @@
# error SOLENOID_PIN not defined
#endif
+#ifdef SOLENOID_PIN_ACTIVE_LOW
+# define SOLENOID_PIN_WRITE_ACTIVE() writePinLow(SOLENOID_PIN)
+# define SOLENOID_PIN_WRITE_INACTIVE() writePinHigh(SOLENOID_PIN)
+#else
+# define SOLENOID_PIN_WRITE_ACTIVE() writePinHigh(SOLENOID_PIN)
+# define SOLENOID_PIN_WRITE_INACTIVE() writePinLow(SOLENOID_PIN)
+#endif
+
void solenoid_buzz_on(void);
void solenoid_buzz_off(void);
void solenoid_set_buzz(int buzz);