Main Program

Dependencies:   mbed AQM1602 HMC6352 PID

Committer:
lilac0112_1
Date:
Wed Sep 16 04:27:11 2015 +0000
Revision:
6:4e83c236ee57
Parent:
5:de0f26f533d8
Child:
10:3d0714c1ac75
soso

Who changed what in which revision?

UserRevisionLine numberNew 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 4:69fd47e1d296 12 #define NONE 0x0
lilac0112_1 4:69fd47e1d296 13 #define START 0x1
lilac0112_1 4:69fd47e1d296 14 #define DEBUG0 0x2
lilac0112_1 4:69fd47e1d296 15 #define DEBUG1 0x3
lilac0112_1 4:69fd47e1d296 16 #define DEBUG2 0x4
lilac0112_1 4:69fd47e1d296 17 #define TEST0 0x5
lilac0112_1 4:69fd47e1d296 18 #define TEST1 0x6
lilac0112_1 4:69fd47e1d296 19 #define TEST2 0x7
lilac0112_1 4:69fd47e1d296 20 #define CALIBRATION0 0x8
lilac0112_1 4:69fd47e1d296 21 #define CALIBRATION1 0x9
lilac0112_1 4:69fd47e1d296 22 #define CALIBRATION2 0xA
lilac0112_1 4:69fd47e1d296 23 #define SAVE 0xB
lilac0112_1 4:69fd47e1d296 24 #define STORE 0xC
lilac0112_1 4:69fd47e1d296 25 #define DEFENCE0 0xD
lilac0112_1 4:69fd47e1d296 26 #define ATTACK0 0xE
lilac0112_1 4:69fd47e1d296 27
lilac0112_1 4:69fd47e1d296 28 #define BUFSIZE 10
lilac0112_1 6:4e83c236ee57 29 #define STATE_NUM_X 0x04
lilac0112_1 6:4e83c236ee57 30 #define STATE_NUM_Y 0x10
lilac0112_1 6:4e83c236ee57 31
lilac0112_1 6:4e83c236ee57 32 #define FRONT 0x01
lilac0112_1 6:4e83c236ee57 33 #define BACK 0x02
lilac0112_1 1:f2633c150301 34
lilac0112_1 1:f2633c150301 35 typedef struct {
lilac0112_1 1:f2633c150301 36 uint8_t ping[4];
lilac0112_1 1:f2633c150301 37 uint8_t ir[12];
lilac0112_1 1:f2633c150301 38 uint8_t irLong[6];
lilac0112_1 1:f2633c150301 39 uint8_t line[3];
lilac0112_1 1:f2633c150301 40 uint8_t mouse[2];
lilac0112_1 1:f2633c150301 41 uint16_t compass;
lilac0112_1 1:f2633c150301 42 uint8_t color[3];
lilac0112_1 5:de0f26f533d8 43 uint8_t lcdpoint[2];
lilac0112_1 1:f2633c150301 44 } Record;
lilac0112_1 1:f2633c150301 45
lilac0112_1 1:f2633c150301 46 #endif