coffee.h 775 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * coffee.h
  3. *
  4. * Created on: Sep 25, 2017
  5. * Author: sebastian
  6. */
  7. #ifndef COFFEE_H_
  8. #define COFFEE_H_
  9. //define status
  10. #define STATE_OFF 0
  11. #define STATE_HEATING 1
  12. #define STATE_INITALHEATING 2
  13. #define STATE_IDLE 3
  14. #define STATE_BREW 4
  15. #define STATE_BREWMANUAL 5
  16. #define STATE_CLEANING 6
  17. #define STATE_ERROR 7
  18. #define TIME_PREINFUSION 3000 //Preinfusion time in ms
  19. #define TIME_SOAK 3000//Time between preinfusion and infusion in ms
  20. #define TIME_INFUSION 25000 //Infusion time in ms
  21. #define TIME_DBLESPRESSO 25.0 //Size of a double espresso in ml
  22. void *coffeeThread(void *threadid);
  23. void coffeeHandler (int signum, siginfo_t *siginfo, void *context);
  24. int getSigValue(void);
  25. void changeState(int newState);
  26. void brewTimeHandler (void);
  27. #endif /* COFFEE_H_ */