|
@@ -16,7 +16,7 @@
|
|
|
|
|
|
int flowcnt = 0;
|
|
int flowcnt = 0;
|
|
|
|
|
|
-/*
|
|
|
|
|
|
+/**
|
|
* Initializes HAL
|
|
* Initializes HAL
|
|
*/
|
|
*/
|
|
void halInit(void) {
|
|
void halInit(void) {
|
|
@@ -59,7 +59,7 @@ void halInit(void) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
|
|
+/**
|
|
* Switches relais on
|
|
* Switches relais on
|
|
* @param relais Relais ID
|
|
* @param relais Relais ID
|
|
*/
|
|
*/
|
|
@@ -67,7 +67,7 @@ void halRelaisOn(int relais) {
|
|
halRelaisSet(relais, LOW);
|
|
halRelaisSet(relais, LOW);
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
|
|
+/**
|
|
* Switches relais off
|
|
* Switches relais off
|
|
* @param relais Relais ID
|
|
* @param relais Relais ID
|
|
*/
|
|
*/
|
|
@@ -75,7 +75,7 @@ void halRelaisOff(int relais) {
|
|
halRelaisSet(relais, HIGH);
|
|
halRelaisSet(relais, HIGH);
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
|
|
+/**
|
|
* Switches relais to state
|
|
* Switches relais to state
|
|
* @param relais Relais ID
|
|
* @param relais Relais ID
|
|
* @param state LOW(0) or HIGH(1)
|
|
* @param state LOW(0) or HIGH(1)
|
|
@@ -92,7 +92,7 @@ void halRelaisSet(int relais, int state) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
|
|
+/**
|
|
* Returns the state of the relais relais
|
|
* Returns the state of the relais relais
|
|
* Returns HIGH when Relais is ON
|
|
* Returns HIGH when Relais is ON
|
|
* @param relais Relais ID
|
|
* @param relais Relais ID
|
|
@@ -137,7 +137,7 @@ void halIntFlow(void) {
|
|
flowcnt++;
|
|
flowcnt++;
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
|
|
+/**
|
|
* Method to handle toggle of the pressure control
|
|
* Method to handle toggle of the pressure control
|
|
*/
|
|
*/
|
|
void halIntPressure(void) {
|
|
void halIntPressure(void) {
|
|
@@ -149,7 +149,7 @@ void halIntPressure(void) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
|
|
+/**
|
|
* Method to handle toggle of the proximity sensor
|
|
* Method to handle toggle of the proximity sensor
|
|
*/
|
|
*/
|
|
void halIntProximity(void) {
|
|
void halIntProximity(void) {
|
|
@@ -161,21 +161,21 @@ void halIntProximity(void) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
|
|
+/**
|
|
* Returns total flow trough sensor in ml
|
|
* Returns total flow trough sensor in ml
|
|
*/
|
|
*/
|
|
float halGetFlow(void) {
|
|
float halGetFlow(void) {
|
|
return flowcnt*FLOW_ML_PULSE;
|
|
return flowcnt*FLOW_ML_PULSE;
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
|
|
+/**
|
|
* Resets the Flow counter
|
|
* Resets the Flow counter
|
|
*/
|
|
*/
|
|
void halResetFlow(void){
|
|
void halResetFlow(void){
|
|
flowcnt = 0;
|
|
flowcnt = 0;
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
|
|
+/**
|
|
* Reads the status of the Pressure Control
|
|
* Reads the status of the Pressure Control
|
|
* @return 0 for closed Pressure Control(heating) and 1 for open
|
|
* @return 0 for closed Pressure Control(heating) and 1 for open
|
|
*/
|
|
*/
|
|
@@ -187,7 +187,7 @@ bool halIsHeating(void) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
|
|
+/**
|
|
* Returns status of the proximity switch
|
|
* Returns status of the proximity switch
|
|
* @return 1 if the proximity switch is covered and 0 if uncovered
|
|
* @return 1 if the proximity switch is covered and 0 if uncovered
|
|
*/
|
|
*/
|
|
@@ -200,7 +200,7 @@ bool halProxSensorCovered(void){
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
|
|
+/**
|
|
* Returns the value of the top button Int0 (low active)
|
|
* Returns the value of the top button Int0 (low active)
|
|
* @return LOW or HIGH
|
|
* @return LOW or HIGH
|
|
*/
|
|
*/
|
|
@@ -208,7 +208,7 @@ int halGetInt0(void){
|
|
return digitalRead(INT0);
|
|
return digitalRead(INT0);
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
|
|
+/**
|
|
* Returns the value of the bottom button Int1 (low active)
|
|
* Returns the value of the bottom button Int1 (low active)
|
|
* @return LOW or HIGH
|
|
* @return LOW or HIGH
|
|
*/
|
|
*/
|
|
@@ -216,8 +216,9 @@ int halGetInt1(void){
|
|
return digitalRead(INT1);
|
|
return digitalRead(INT1);
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
|
|
+/**
|
|
* send Signal to coffee thread
|
|
* send Signal to coffee thread
|
|
|
|
+ * @param val Integer value assigned to signal
|
|
*/
|
|
*/
|
|
void halSendSignal(int val){
|
|
void halSendSignal(int val){
|
|
sigval value = {0};
|
|
sigval value = {0};
|