Main Program

Dependencies:   mbed AQM1602 HMC6352 PID

Committer:
lilac0112_1
Date:
Tue Sep 15 06:10:26 2015 +0000
Revision:
3:f7c906e52339
Parent:
2:97a4070c34d7
Child:
4:69fd47e1d296

        

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 2:97a4070c34d7 12 typedef enum{
lilac0112_1 2:97a4070c34d7 13 NONE = 0x0,
lilac0112_1 2:97a4070c34d7 14 START,
lilac0112_1 2:97a4070c34d7 15 DEBUG0,
lilac0112_1 2:97a4070c34d7 16 DEBUG1,
lilac0112_1 2:97a4070c34d7 17 DEBUG2,
lilac0112_1 2:97a4070c34d7 18 TEST0,
lilac0112_1 2:97a4070c34d7 19 TEST1,
lilac0112_1 2:97a4070c34d7 20 TEST2,
lilac0112_1 2:97a4070c34d7 21 CALIBRATION0,
lilac0112_1 2:97a4070c34d7 22 CALIBRATION1,
lilac0112_1 2:97a4070c34d7 23 CALIBRATION2,
lilac0112_1 2:97a4070c34d7 24 SAVE,
lilac0112_1 2:97a4070c34d7 25 STORE,
lilac0112_1 2:97a4070c34d7 26 DEFENCE0,
lilac0112_1 2:97a4070c34d7 27 ATTACK0,
lilac0112_1 2:97a4070c34d7 28 STOP
lilac0112_1 2:97a4070c34d7 29 } SwState;
lilac0112_1 2:97a4070c34d7 30 //スイッチ 入力値
lilac0112_1 2:97a4070c34d7 31 #define FRONT 0x1
lilac0112_1 2:97a4070c34d7 32 #define BACK 0x2
lilac0112_1 2:97a4070c34d7 33 #define EXIT 0x3
lilac0112_1 2:97a4070c34d7 34 //Lcd出力文字サイズ
lilac0112_1 2:97a4070c34d7 35 #define BUFSIZE 7
lilac0112_1 1:f2633c150301 36
lilac0112_1 1:f2633c150301 37 typedef struct {
lilac0112_1 1:f2633c150301 38 uint8_t ping[4];
lilac0112_1 1:f2633c150301 39 uint8_t ir[12];
lilac0112_1 1:f2633c150301 40 uint8_t irLong[6];
lilac0112_1 1:f2633c150301 41 uint8_t line[3];
lilac0112_1 1:f2633c150301 42 uint8_t mouse[2];
lilac0112_1 1:f2633c150301 43 uint16_t compass;
lilac0112_1 1:f2633c150301 44 uint8_t color[3];
lilac0112_1 1:f2633c150301 45 } Record;
lilac0112_1 1:f2633c150301 46
lilac0112_1 1:f2633c150301 47 #endif