![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
UDPversion
Dependencies: XBee mbed NetServicesMin
config.h@1:3a46d2725374, 2012-04-15 (annotated)
- Committer:
- recotana
- Date:
- Sun Apr 15 10:49:08 2012 +0000
- Revision:
- 1:3a46d2725374
- Parent:
- 0:84a3b029656e
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
recotana | 0:84a3b029656e | 1 | #ifndef _CONFIG_ |
recotana | 0:84a3b029656e | 2 | #define _CONFIG_ |
recotana | 0:84a3b029656e | 3 | #include "mbed.h" |
recotana | 0:84a3b029656e | 4 | |
recotana | 1:3a46d2725374 | 5 | |
recotana | 1:3a46d2725374 | 6 | //#define _SERVER_TEST_MODE_ |
recotana | 1:3a46d2725374 | 7 | |
recotana | 0:84a3b029656e | 8 | //#define DEBUG |
recotana | 0:84a3b029656e | 9 | |
recotana | 0:84a3b029656e | 10 | |
recotana | 0:84a3b029656e | 11 | #ifdef DEBUG |
recotana | 0:84a3b029656e | 12 | #define DBGV(fmt, ...) pc.printf(fmt, __VA_ARGS__) |
recotana | 0:84a3b029656e | 13 | #define DBGF(X) pc.printf(X); |
recotana | 0:84a3b029656e | 14 | #else |
recotana | 0:84a3b029656e | 15 | #define DBGV(...) |
recotana | 0:84a3b029656e | 16 | #define DBGF(...) |
recotana | 0:84a3b029656e | 17 | #endif |
recotana | 0:84a3b029656e | 18 | |
recotana | 0:84a3b029656e | 19 | //mbed server.client |
recotana | 0:84a3b029656e | 20 | #define kSserverIp 192,168,0,111 |
recotana | 0:84a3b029656e | 21 | #define kSubnetMask 255,255,255,0 |
recotana | 0:84a3b029656e | 22 | #define kRouterIp 192,168,0,1 |
recotana | 0:84a3b029656e | 23 | #define kServerPort 12345 |
recotana | 0:84a3b029656e | 24 | |
recotana | 0:84a3b029656e | 25 | //iPad |
recotana | 0:84a3b029656e | 26 | #define kClientIp 192,168,0,2 |
recotana | 0:84a3b029656e | 27 | #define kClientPort 12346 |
recotana | 0:84a3b029656e | 28 | |
recotana | 0:84a3b029656e | 29 | #define kXBeeNo0DL 0x4086B0D5 //mbed server.client |
recotana | 0:84a3b029656e | 30 | #define kXBeeNo1DL 0x4086AFDE //sender |
recotana | 0:84a3b029656e | 31 | #define kXBeeNo2DL 0x4086AFEA //reciever |
recotana | 0:84a3b029656e | 32 | |
recotana | 0:84a3b029656e | 33 | #define kDeviceServer kXBeeNo0DL |
recotana | 0:84a3b029656e | 34 | #define kLedSender kXBeeNo1DL |
recotana | 0:84a3b029656e | 35 | #define kLedReciever kXBeeNo2DL |
recotana | 0:84a3b029656e | 36 | |
recotana | 0:84a3b029656e | 37 | #define kMyXBeeAddress kDeviceServer |
recotana | 0:84a3b029656e | 38 | |
recotana | 0:84a3b029656e | 39 | #define kXBeeBoudRate 115200 |
recotana | 0:84a3b029656e | 40 | |
recotana | 0:84a3b029656e | 41 | #define kiPadServerCheckInterval 10 |
recotana | 0:84a3b029656e | 42 | |
recotana | 0:84a3b029656e | 43 | #define kHealthCheckiPad 0xF0 //health check command |
recotana | 0:84a3b029656e | 44 | #define kHealthCheckmbed 0xF1 //health check command |
recotana | 0:84a3b029656e | 45 | |
recotana | 0:84a3b029656e | 46 | typedef enum{ |
recotana | 0:84a3b029656e | 47 | close, |
recotana | 0:84a3b029656e | 48 | connecting, |
recotana | 0:84a3b029656e | 49 | connected |
recotana | 0:84a3b029656e | 50 | } ConnectStatus; |
recotana | 0:84a3b029656e | 51 | |
recotana | 0:84a3b029656e | 52 | #endif |