hal.h 754 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * hal.h
  3. *
  4. * Created on: Aug 3, 2016
  5. * Author: sebastian
  6. */
  7. #ifndef HAL_H_
  8. #define HAL_H_
  9. #define RELAIS_HEAT 29
  10. #define RELAIS_PUMP 25
  11. #define RELAIS_POWER 28
  12. #define PRESSURE_CTRL 24
  13. #define PROXIMITY_SENSOR 6
  14. #define HAL_INT0 0 // bottom button
  15. #define HAL_INT1 2 // top button
  16. #define HAL_FLOW 3 // flow sensor
  17. #define HAL_PROX_COVERED 1 //proximity sensor
  18. #define FLOW_ML_PULSE (1000.0/990) // Flow sensor: volume (ml) per pulse
  19. void halInit(void);
  20. void halRelaisOn(int relais);
  21. void halRelaisOff(int relais);
  22. void halRelaisSet(int relais, int state);
  23. void halInt0(void);
  24. void halInt1(void);
  25. void halIntFlow(void);
  26. float halGetFlow(void);
  27. int halGetPressureCtrl(void);
  28. int halGetProximitySensor(void);
  29. #endif /* HAL_H_ */