Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * state.h
- *
- * Created on: 16 mai 2013
- * Author: Valentin
- */
- #ifndef STATE_H_
- #define STATE_H_
- #include "msp430.h"
- #include <stdint.h>
- #include "RTC.h"
- #define T_AFF 4 // Delay of display.
- #define T_LONG_PRESS 8 // A longer press is a long press.
- #define T_REPRESS 1 // Repeat action every T_REPRESS.
- #define T_TIMEOUT 8 // User finished his action if no action since T_TIMEOUT.
- typedef enum {REPOS, WAKE, AFF_HOUR, AFF_MIN, SETTINGS, SET_HOUR, INC_HOUR, INC_HOUR_LONG, SET_MIN, INC_MIN, INC_MIN_LONG} State;
- void updateInputs(void);
- void updateStateMachine(void);
- void updateOutputs(void);
- void sleep(uint16_t ms);
- void incHours(void);
- void incMinutes(void);
- #endif /* STATE_H_ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement