Advertisement
Guest User

state.h

a guest
May 18th, 2014
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. /*
  2.  * state.h
  3.  *
  4.  *  Created on: 16 mai 2013
  5.  *      Author: Valentin
  6.  */
  7.  
  8. #ifndef STATE_H_
  9. #define STATE_H_
  10.  
  11. #include "msp430.h"
  12. #include <stdint.h>
  13.  
  14. #include "RTC.h"
  15.  
  16. #define T_AFF           4   // Delay of display.
  17. #define T_LONG_PRESS    8   // A longer press is a long press.
  18. #define T_REPRESS       1   // Repeat action every T_REPRESS.
  19. #define T_TIMEOUT       8   // User finished his action if no action since T_TIMEOUT.
  20.  
  21. typedef enum {REPOS, WAKE, AFF_HOUR, AFF_MIN, SETTINGS, SET_HOUR, INC_HOUR, INC_HOUR_LONG, SET_MIN, INC_MIN, INC_MIN_LONG} State;
  22.  
  23. void updateInputs(void);
  24. void updateStateMachine(void);
  25. void updateOutputs(void);
  26. void sleep(uint16_t ms);
  27. void incHours(void);
  28. void incMinutes(void);
  29.  
  30.  
  31. #endif /* STATE_H_ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement