From 2bd1833c774aad0dd681c6905d878a97b3a046a9 Mon Sep 17 00:00:00 2001 From: Joseph Coffland Date: Sun, 14 Jan 2018 14:55:14 -0800 Subject: [PATCH] Updated coolant to use new output system --- src/avr/src/coolant.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) 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);} -- 2.27.0