Subversion Repositories Code-Repo

Rev

Rev 111 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 111 Rev 112
Line 11... Line 11...
11
// Enable or disable debug prints depending on project preprocessor (_DEBUG)
11
// Enable or disable debug prints depending on project preprocessor (_DEBUG)
12
#ifdef _DEBUG
12
#ifdef _DEBUG
13
#define DBG_PRINT_MAIN(x) printf(x)
13
#define DBG_PRINT_MAIN(x) printf(x)
14
#define DBG_PRINT_I2C(x)
14
#define DBG_PRINT_I2C(x)
15
#define DBG_PRINT_XBEE(x)
15
#define DBG_PRINT_XBEE(x)
16
#define DBG_PRINT_PORTB_INT(x) printf(x)
16
#define DBG_PRINT_PORTB_INT(x)
17
#define DBG_PRINT_INT(x) printf(x)
17
#define DBG_PRINT_INT(x) 
18
#define DBG_PRINT_BUFFER(x)
18
#define DBG_PRINT_BUFFER(x)
19
#else
19
#else
20
#define DBG_PRINT_MAIN(x)
20
#define DBG_PRINT_MAIN(x)
21
#define DBG_PRINT_I2C(x)
21
#define DBG_PRINT_I2C(x)
22
#define DBG_PRINT_XBEE(x)
22
#define DBG_PRINT_XBEE(x)
23
#define DBG_PRINT_PORTB_INT(x)
23
#define DBG_PRINT_PORTB_INT(x)
24
#define DBG_PRINT_INT(x)
24
#define DBG_PRINT_INT(x)
25
#define DBG_PRINT_BUFFER(x)
25
#define DBG_PRINT_BUFFER(x)
26
#endif
26
#endif
27
 
27
 
28
//#define memcpy(a,b,c)   memcpy((a),(const void*)(b),(c))
-
 
29
//#define memcmp(a,b,c)   memcmp((const void*)(a),(const void*)(b),(c))
-
 
30
//#define strcpy(a,b)     strcpy((char*)(a),(const char*)(b))
-
 
31
 
-
 
32
// Message type definitions
28
// Message type definitions
33
#define MSGTYPE_RESEND 1
29
#define MSGTYPE_RESEND 1
34
 
30
 
35
#define MSGTYPE_TIMER0      10
31
#define MSGTYPE_TIMER0      10
36
#define MSGTYPE_TIMER1      11
32
#define MSGTYPE_TIMER1      11
Line 73... Line 69...
73
#define MSGTYPE_PORTB_6_DOWN    74
69
#define MSGTYPE_PORTB_6_DOWN    74
74
#define MSGTYPE_PORTB_6_UP      75
70
#define MSGTYPE_PORTB_6_UP      75
75
#define MSGTYPE_PORTB_7_DOWN    76
71
#define MSGTYPE_PORTB_7_DOWN    76
76
#define MSGTYPE_PORTB_7_UP      77
72
#define MSGTYPE_PORTB_7_UP      77
77
 
73
 
-
 
74
#define MSGTYPE_INT1    80
-
 
75
 
-
 
76
enum I2C_STATE {
-
 
77
    I2C_STATE_IDLE,
-
 
78
    I2C_WAIT_WRITE_LENGTH_ACK,
-
 
79
    I2C_WAIT_WRITE_DATA_ACK,
-
 
80
    I2C_WAIT_REPLY_LENGTH,
-
 
81
    I2C_WAIT_REPLY_DATA
-
 
82
};
78
 
83
 
79
#endif
84
#endif
80
 
85