Subversion Repositories Code-Repo

Rev

Rev 109 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 109 Rev 111
Line 3... Line 3...
3
 
3
 
4
#include <p18f27j13.h>
4
#include <p18f27j13.h>
5
#include <stdio.h>
5
#include <stdio.h>
6
 
6
 
7
//#define _DEBUG
7
//#define _DEBUG
8
//#define _MASTER
8
#define _BASE_STATION
9
#define _SLAVE
9
//#define _REMOTE
10
 
10
 
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)
16
#define DBG_PRINT_PORTB_INT(x) printf(x)
-
 
17
#define DBG_PRINT_INT(x) printf(x)
-
 
18
#define DBG_PRINT_BUFFER(x)
17
#else
19
#else
18
#define DBG_PRINT_MAIN(x)
20
#define DBG_PRINT_MAIN(x)
19
#define DBG_PRINT_I2C(x)
21
#define DBG_PRINT_I2C(x)
20
#define DBG_PRINT_XBEE(x)
22
#define DBG_PRINT_XBEE(x)
21
#define DBG_PRINT_PORTB_INT(x)
23
#define DBG_PRINT_PORTB_INT(x)
-
 
24
#define DBG_PRINT_INT(x)
-
 
25
#define DBG_PRINT_BUFFER(x)
22
#endif
26
#endif
23
 
27
 
24
//#define memcpy(a,b,c)   memcpy((a),(const void*)(b),(c))
28
//#define memcpy(a,b,c)   memcpy((a),(const void*)(b),(c))
25
//#define memcmp(a,b,c)   memcmp((const void*)(a),(const void*)(b),(c))
29
//#define memcmp(a,b,c)   memcmp((const void*)(a),(const void*)(b),(c))
26
//#define strcpy(a,b)     strcpy((char*)(a),(const char*)(b))
30
//#define strcpy(a,b)     strcpy((char*)(a),(const char*)(b))