Main Program

Dependencies:   mbed AQM1602 HMC6352 PID

Committer:
lilac0112_1
Date:
Tue Sep 15 06:39:45 2015 +0000
Revision:
4:69fd47e1d296
Parent:
3:f7c906e52339
Child:
5:de0f26f533d8
succeeded in compile

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 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