-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.h
51 lines (39 loc) · 871 Bytes
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef MAIN_H_
#define MAIN_H_
#ifdef __cplusplus
extern "C"
{
#endif
#include "stdint.h"
#include "stdbool.h"
#include <msp430.h>
#include "ssd1306.h"
#include "i2c.h"
#include "clock.h"
#include "actuators.h"
/*-------------- defines ---------------*/
/* Compiler switches */
/* Watchdog related defines */
#define WATCHDOG_TIMEOUT_MS 5000 // 5 seconds
/* LED related defines */
#define GREEN (0x00U)
#define RED (0x01U)
/* Time related defines */
#define UINT8_MIN (0U)
#define IRRIGATION_TIME (15U) // 15 sec
/* OLED LCD related defines*/
#define MAX_COUNT (4294967295UL)
/*---------- type definitions ----------*/
typedef enum EState_
{
INIT,
COUNTING_DOWN,
UNDER_CONFIGURATION,
IRRIGATION
}EState;
void watchdog_init();
void watchdog_feed();
#ifdef __cplusplus
}
#endif
#endif /* MAIN_H_ */