diff options
author | Ryan <fauxpark@gmail.com> | 2020-04-30 16:24:47 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-30 16:24:47 +1000 |
commit | 16a15c1cfcbfd0feb2c2cf1383676747e2f97d73 (patch) | |
tree | aaa3c9f5a23207861d05c37ed4860af8efd40f85 /users/mtdjr | |
parent | 37a4b53c4f51b66992e687b5012c83df9cc6b138 (diff) | |
download | qmk_firmware-16a15c1cfcbfd0feb2c2cf1383676747e2f97d73.tar.gz qmk_firmware-16a15c1cfcbfd0feb2c2cf1383676747e2f97d73.zip |
QMK-ify some GPIO macros (#8315)
Diffstat (limited to 'users/mtdjr')
-rw-r--r-- | users/mtdjr/solenoid.h | 11 |
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 |