summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/mtdjr/solenoid.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/users/mtdjr/solenoid.h b/users/mtdjr/solenoid.h
index a911bf794f..4ef329b4ad 100644
--- a/users/mtdjr/solenoid.h
+++ b/users/mtdjr/solenoid.h
@@ -2,7 +2,6 @@
#define SOLENOID_H
#include <timer.h>
-#include "pincontrol.h"
#define SOLENOID_DEFAULT_DWELL 12
@@ -45,7 +44,7 @@ void solenoid_toggle(void) {
}
void solenoid_stop(void) {
- digitalWrite(SOLENOID_PIN, PinLevelLow);
+ writePinLow(SOLENOID_PIN);
solenoid_on = false;
solenoid_buzzing = false;
}
@@ -59,7 +58,7 @@ void solenoid_fire(void) {
solenoid_on = true;
solenoid_buzzing = true;
solenoid_start = timer_read();
- digitalWrite(SOLENOID_PIN, PinLevelHigh);
+ writePinHigh(SOLENOID_PIN);
}
void solenoid_check(void) {
@@ -80,20 +79,20 @@ void solenoid_check(void) {
if (elapsed / SOLENOID_MIN_DWELL % 2 == 0){
if (!solenoid_buzzing) {
solenoid_buzzing = true;
- digitalWrite(SOLENOID_PIN, PinLevelHigh);
+ writePinHigh(SOLENOID_PIN);
}
}
else {
if (solenoid_buzzing) {
solenoid_buzzing = false;
- digitalWrite(SOLENOID_PIN, PinLevelLow);
+ writePinLow(SOLENOID_PIN);
}
}
}
}
void solenoid_setup(void) {
- pinMode(SOLENOID_PIN, PinDirectionOutput);
+ setPinOutput(SOLENOID_PIN);
}
#endif