ryo seki
/
serialSend5_5
final_slave
Diff: uart1.h
- Revision:
- 0:7d0227dcc289
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uart1.h Wed Jun 19 08:42:10 2013 +0000 @@ -0,0 +1,47 @@ + +#define SEND_DATA_NUM 14 +#define RECEIVE_DATA_NUM 18 + +#define KEYCODE 120 +#define CHECKCODE (SendData0[DIRECTIONN] ^ SendData0[DISTANCE] ^ SendData0[SONIC1_1] ^ SendData0[SONIC1_2] ^ SendData0[SONIC2_1] ^ SendData0[SONIC2_2] ^ SendData0[SONIC3_1] ^ SendData0[SONIC3_2] ^ SendData0[SONIC4_1] ^ SendData0[SONIC4_2] ^ SendData0[IR_FOUND] ^ SendData0[XBEE]) +#define KEYCODE2 35 +#define CHECKCODE2 (RecData[DATA1] ^ RecData[DATA2] ^ RecData[DATA3] ^ RecData[DATA4] ^ RecData[DISTANCE1] ^ RecData[DISTANCE1_2] ^ RecData[DISTANCE2] ^ RecData[DISTANCE2_2] ^ RecData[DISTANCE3] ^ RecData[DISTANCE3_2] ^ RecData[DISTANCE4] ^ RecData[DISTANCE4_2] ^ RecData[DISTANCE5] ^ RecData[DISTANCE5_2] ^ RecData[DISTANCE6] ^ RecData[DISTANCE6_2]) + + +enum{ + KEY = 0, + DIRECTIONN, + DISTANCE, + SONIC1_1, + SONIC1_2, + SONIC2_1, + SONIC2_2, + SONIC3_1, + SONIC3_2, + SONIC4_1, + SONIC4_2, + IR_FOUND, + XBEE, + CHECK, +}; + +enum{ + KEY2 = 0, + DATA1, + DATA2, + DATA3, + DATA4, + DISTANCE1, + DISTANCE1_2, + DISTANCE2, + DISTANCE2_2, + DISTANCE3, + DISTANCE3_2, + DISTANCE4, + DISTANCE4_2, + DISTANCE5, + DISTANCE5_2, + DISTANCE6, + DISTANCE6_2, + CHECK2, +};