Main Program

Dependencies:   mbed AQM1602 HMC6352 PID

def.h

Committer:
lilac0112_1
Date:
2015-09-15
Revision:
3:f7c906e52339
Parent:
2:97a4070c34d7
Child:
4:69fd47e1d296

File content as of revision 3:f7c906e52339:

#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は配列の最後

//ロータリースイッチ 入力値
typedef enum{
    NONE = 0x0,
    START,
    DEBUG0,
    DEBUG1,
    DEBUG2,
    TEST0,
    TEST1,
    TEST2,
    CALIBRATION0,
    CALIBRATION1,
    CALIBRATION2,
    SAVE,
    STORE,
    DEFENCE0,
    ATTACK0,
    STOP
} SwState;
//スイッチ 入力値
#define FRONT   0x1
#define BACK    0x2
#define EXIT    0x3
//Lcd出力文字サイズ
#define BUFSIZE 7

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];
} Record;

#endif