Main Program

Dependencies:   mbed AQM1602 HMC6352 PID

def.h

Committer:
lilac0112_1
Date:
2015-09-15
Revision:
5:de0f26f533d8
Parent:
4:69fd47e1d296
Child:
6:4e83c236ee57

File content as of revision 5:de0f26f533d8:

#ifndef _DEF_H_
#define _DEF_H_

//BT(BlueTooth)
#define DATA_NUM 8+2//2byte→KEYCODE(拝啓)とCHECKCODE(敬具) 8byte→やりとりするデータ
#define TX_KEYCODE 0xAA//あちらのKEYCODE
#define RX_KEYCODE 0xAA//こちらのKEYCODE
#define KEY 0//KEYCODEは配列の最初
#define CHECK DATA_NUM-1//CHECKCODEは配列の最後

//ロータリースイッチ 入力値
#define NONE    0x0
#define START   0x1
#define DEBUG0  0x2
#define DEBUG1  0x3
#define DEBUG2  0x4
#define TEST0   0x5
#define TEST1   0x6
#define TEST2   0x7
#define CALIBRATION0    0x8
#define CALIBRATION1    0x9
#define CALIBRATION2    0xA
#define SAVE            0xB
#define STORE           0xC
#define DEFENCE0        0xD
#define ATTACK0        0xE

#define BUFSIZE 10

typedef struct {
    uint8_t ping[4];
    uint8_t ir[12];
    uint8_t irLong[6];
    uint8_t line[3];
    uint8_t mouse[2];
    uint16_t compass;
    uint8_t color[3];
    uint8_t lcdpoint[2];
} Record;

#endif