|
@@ -31,6 +31,8 @@ void halInit(void) {
|
|
|
pinMode(RELAIS_HEAT, OUTPUT);
|
|
|
pinMode(RELAIS_PUMP, OUTPUT);
|
|
|
pinMode(RELAIS_POWER, OUTPUT);
|
|
|
+ pinMode(PRESSURE_CTRL, INPUT);
|
|
|
+ pinMode(PROXIMITY_SENSOR, INPUT);
|
|
|
pinMode(HAL_INT0, INPUT);
|
|
|
pinMode(HAL_INT1, INPUT);
|
|
|
pinMode(HAL_FLOW, INPUT);
|
|
@@ -112,3 +114,22 @@ float halGetFlow(void) {
|
|
|
return flowcnt*FLOW_ML_PULSE;
|
|
|
}
|
|
|
|
|
|
+/*
|
|
|
+ * Reads the status of the Pressure Control
|
|
|
+ * @return 1 for closed Pressure Control and 0 for open
|
|
|
+ */
|
|
|
+int halGetPressureCtrl(void) {
|
|
|
+ if (digitalRead(PRESSURE_CTRL)) {
|
|
|
+ return 0;
|
|
|
+ } else
|
|
|
+ return 1;
|
|
|
+}
|
|
|
+
|
|
|
+/*
|
|
|
+ * Returns status of the proximity switch
|
|
|
+ * @return 1 if the proximity switch is covered and 0 if uncovered
|
|
|
+ */
|
|
|
+int halGetProximitySensor(void){
|
|
|
+ return digitalRead(PROXIMITY_SENSOR);
|
|
|
+}
|
|
|
+
|