From: Joseph Coffland Date: Sun, 14 Jan 2018 22:55:14 +0000 (-0800) Subject: Updated coolant to use new output system X-Git-Url: https://git.buildbotics.com/?a=commitdiff_plain;h=2bd1833c774aad0dd681c6905d878a97b3a046a9;p=bbctrl-firmware Updated coolant to use new output system --- diff --git a/src/avr/src/coolant.c b/src/avr/src/coolant.c index 46ec802..4f8fa36 100644 --- a/src/avr/src/coolant.c +++ b/src/avr/src/coolant.c @@ -26,20 +26,15 @@ \******************************************************************************/ #include "coolant.h" -#include "config.h" -#include +#include "config.h" +#include "outputs.h" -void coolant_init() { - OUTSET_PIN(SWITCH_1_PIN); // High - DIRSET_PIN(SWITCH_1_PIN); // Output - OUTSET_PIN(SWITCH_2_PIN); // High - DIRSET_PIN(SWITCH_2_PIN); // Output -} +void coolant_init() {} -void coolant_set_mist(bool x) {SET_PIN(SWITCH_1_PIN, !x);} -void coolant_set_flood(bool x) {SET_PIN(SWITCH_2_PIN, !x);} -bool coolant_get_mist() {return OUT_PIN(SWITCH_1_PIN);} -bool coolant_get_flood() {return OUT_PIN(SWITCH_2_PIN);} +void coolant_set_mist(bool x) {outputs_set_active(SWITCH_1_PIN, x);} +void coolant_set_flood(bool x) {outputs_set_active(SWITCH_2_PIN, x);} +bool coolant_get_mist() {return outputs_is_active(SWITCH_1_PIN);} +bool coolant_get_flood() {return outputs_is_active(SWITCH_2_PIN);}