Main Program
Dependencies: mbed AQM1602 HMC6352 PID
def.h@1:f2633c150301, 2015-09-15 (annotated)
- Committer:
- lilac0112_1
- Date:
- Tue Sep 15 01:40:28 2015 +0000
- Revision:
- 1:f2633c150301
- Child:
- 2:97a4070c34d7
some how
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lilac0112_1 | 1:f2633c150301 | 1 | #ifndef _DEF_H_ |
lilac0112_1 | 1:f2633c150301 | 2 | #define _DEF_H_ |
lilac0112_1 | 1:f2633c150301 | 3 | |
lilac0112_1 | 1:f2633c150301 | 4 | //BT(BlueTooth) |
lilac0112_1 | 1:f2633c150301 | 5 | #define DATA_NUM 8+2//2byte→KEYCODE(拝啓)とCHECKCODE(敬具) 8byte→やりとりするデータ |
lilac0112_1 | 1:f2633c150301 | 6 | #define TX_KEYCODE 0xAA//あちらのKEYCODE |
lilac0112_1 | 1:f2633c150301 | 7 | #define RX_KEYCODE 0xAA//こちらのKEYCODE |
lilac0112_1 | 1:f2633c150301 | 8 | #define KEY 0//KEYCODEは配列の最初 |
lilac0112_1 | 1:f2633c150301 | 9 | #define CHECK DATA_NUM-1//CHECKCODEは配列の最後 |
lilac0112_1 | 1:f2633c150301 | 10 | |
lilac0112_1 | 1:f2633c150301 | 11 | //ロータリースイッチ 入力値 |
lilac0112_1 | 1:f2633c150301 | 12 | #define NONE 0x0 |
lilac0112_1 | 1:f2633c150301 | 13 | #define START 0x1 |
lilac0112_1 | 1:f2633c150301 | 14 | #define DEBUG0 0x2 |
lilac0112_1 | 1:f2633c150301 | 15 | #define DEBUG1 0x3 |
lilac0112_1 | 1:f2633c150301 | 16 | #define DEBUG2 0x4 |
lilac0112_1 | 1:f2633c150301 | 17 | #define TEST0 0x5 |
lilac0112_1 | 1:f2633c150301 | 18 | #define TEST1 0x6 |
lilac0112_1 | 1:f2633c150301 | 19 | #define TEST2 0x7 |
lilac0112_1 | 1:f2633c150301 | 20 | #define CALIBRATION0 0x8 |
lilac0112_1 | 1:f2633c150301 | 21 | #define CALIBRATION1 0x9 |
lilac0112_1 | 1:f2633c150301 | 22 | #define CALIBRATION2 0xA |
lilac0112_1 | 1:f2633c150301 | 23 | #define SAVE 0xB |
lilac0112_1 | 1:f2633c150301 | 24 | #define STORE 0xC |
lilac0112_1 | 1:f2633c150301 | 25 | #define DEFENCE0 0xD |
lilac0112_1 | 1:f2633c150301 | 26 | #define ATTACK0 0xE |
lilac0112_1 | 1:f2633c150301 | 27 | |
lilac0112_1 | 1:f2633c150301 | 28 | #define BUFSIZE 10 |
lilac0112_1 | 1:f2633c150301 | 29 | |
lilac0112_1 | 1:f2633c150301 | 30 | typedef struct { |
lilac0112_1 | 1:f2633c150301 | 31 | uint8_t ping[4]; |
lilac0112_1 | 1:f2633c150301 | 32 | uint8_t ir[12]; |
lilac0112_1 | 1:f2633c150301 | 33 | uint8_t irLong[6]; |
lilac0112_1 | 1:f2633c150301 | 34 | uint8_t line[3]; |
lilac0112_1 | 1:f2633c150301 | 35 | uint8_t mouse[2]; |
lilac0112_1 | 1:f2633c150301 | 36 | uint16_t compass; |
lilac0112_1 | 1:f2633c150301 | 37 | uint8_t color[3]; |
lilac0112_1 | 1:f2633c150301 | 38 | } Record; |
lilac0112_1 | 1:f2633c150301 | 39 | |
lilac0112_1 | 1:f2633c150301 | 40 | #endif |