Main Program
Dependencies: mbed AQM1602 HMC6352 PID
def.h@10:3d0714c1ac75, 2015-09-16 (annotated)
- Committer:
- lilac0112_1
- Date:
- Wed Sep 16 08:53:42 2015 +0000
- Revision:
- 10:3d0714c1ac75
- Parent:
- 6:4e83c236ee57
- Child:
- 12:f7456da0517b
added loop2
Who changed what in which revision?
User | Revision | Line number | New 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 | 4:69fd47e1d296 | 11 | |
lilac0112_1 | 10:3d0714c1ac75 | 12 | //Switch 入力値 |
lilac0112_1 | 10:3d0714c1ac75 | 13 | #define NONE 0x00 |
lilac0112_1 | 10:3d0714c1ac75 | 14 | #define FRONT 0x01 |
lilac0112_1 | 10:3d0714c1ac75 | 15 | #define BACK 0x02 |
lilac0112_1 | 10:3d0714c1ac75 | 16 | #define STOP 0x03 |
lilac0112_1 | 10:3d0714c1ac75 | 17 | //Lcd 設定値 |
lilac0112_1 | 4:69fd47e1d296 | 18 | #define BUFSIZE 10 |
lilac0112_1 | 6:4e83c236ee57 | 19 | #define STATE_NUM_X 0x04 |
lilac0112_1 | 6:4e83c236ee57 | 20 | #define STATE_NUM_Y 0x10 |
lilac0112_1 | 10:3d0714c1ac75 | 21 | //繰り返し割り込み |
lilac0112_1 | 10:3d0714c1ac75 | 22 | #define DUTY_NUM 1 |
lilac0112_1 | 6:4e83c236ee57 | 23 | |
lilac0112_1 | 10:3d0714c1ac75 | 24 | #define DUTY_SW 0 |
lilac0112_1 | 10:3d0714c1ac75 | 25 | #define DUTY_GYRO 1 |
lilac0112_1 | 10:3d0714c1ac75 | 26 | #define DUTY_PING 2 |
lilac0112_1 | 10:3d0714c1ac75 | 27 | #define DUTY_COLOR 3 |
lilac0112_1 | 10:3d0714c1ac75 | 28 | #define DUTY_MOUSE 4 |
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 | 5:de0f26f533d8 | 38 | uint8_t lcdpoint[2]; |
lilac0112_1 | 10:3d0714c1ac75 | 39 | uint8_t stopflag; |
lilac0112_1 | 1:f2633c150301 | 40 | } Record; |
lilac0112_1 | 1:f2633c150301 | 41 | |
lilac0112_1 | 1:f2633c150301 | 42 | #endif |