Tas Lab
/
BLE_LightingSwitch
Release for tas lab
Fork of BLE_RCBController by
RCBController.h@4:06b0361c5975, 2015-03-19 (annotated)
- Committer:
- tasdevelop
- Date:
- Thu Mar 19 06:52:09 2015 +0000
- Revision:
- 4:06b0361c5975
- Parent:
- 1:48f6e08a3ac2
KabeSwitch for taslab
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jksoft | 1:48f6e08a3ac2 | 1 | |
jksoft | 1:48f6e08a3ac2 | 2 | |
jksoft | 0:8c643bfe55b7 | 3 | typedef union |
jksoft | 0:8c643bfe55b7 | 4 | { |
jksoft | 1:48f6e08a3ac2 | 5 | |
jksoft | 0:8c643bfe55b7 | 6 | struct { |
jksoft | 1:48f6e08a3ac2 | 7 | /* |
jksoft | 1:48f6e08a3ac2 | 8 | 1-2バイト目:ボタン |
jksoft | 1:48f6e08a3ac2 | 9 | UP: 0x0001 |
jksoft | 1:48f6e08a3ac2 | 10 | DOWN: 0x0002 |
jksoft | 1:48f6e08a3ac2 | 11 | RIGHT: 0x0004 |
jksoft | 1:48f6e08a3ac2 | 12 | LEFT: 0x0008 |
jksoft | 1:48f6e08a3ac2 | 13 | Y button: 0x0010 |
jksoft | 1:48f6e08a3ac2 | 14 | A button: 0x0020 |
jksoft | 1:48f6e08a3ac2 | 15 | B button: 0x0040 |
jksoft | 1:48f6e08a3ac2 | 16 | X button: 0x0100 |
jksoft | 1:48f6e08a3ac2 | 17 | L1: 0x0200 |
jksoft | 1:48f6e08a3ac2 | 18 | L2: 0x0400 |
jksoft | 1:48f6e08a3ac2 | 19 | R1: 0x0800 |
jksoft | 1:48f6e08a3ac2 | 20 | R2: 0x1000 |
jksoft | 1:48f6e08a3ac2 | 21 | START: 0x0003 |
jksoft | 1:48f6e08a3ac2 | 22 | SELECT: 0x000C |
jksoft | 1:48f6e08a3ac2 | 23 | */ |
jksoft | 1:48f6e08a3ac2 | 24 | unsigned X : 1; |
jksoft | 1:48f6e08a3ac2 | 25 | unsigned L1 : 1; |
jksoft | 1:48f6e08a3ac2 | 26 | unsigned L2 : 1; |
jksoft | 1:48f6e08a3ac2 | 27 | unsigned R1 : 1; |
jksoft | 1:48f6e08a3ac2 | 28 | unsigned R2 : 1; |
jksoft | 1:48f6e08a3ac2 | 29 | unsigned space1 : 3; |
jksoft | 0:8c643bfe55b7 | 30 | unsigned UP : 1; |
jksoft | 0:8c643bfe55b7 | 31 | unsigned DOWN : 1; |
jksoft | 0:8c643bfe55b7 | 32 | unsigned RIGHT : 1; |
jksoft | 0:8c643bfe55b7 | 33 | unsigned LEFT : 1; |
jksoft | 0:8c643bfe55b7 | 34 | unsigned Y : 1; |
jksoft | 0:8c643bfe55b7 | 35 | unsigned A : 1; |
jksoft | 0:8c643bfe55b7 | 36 | unsigned B : 1; |
jksoft | 1:48f6e08a3ac2 | 37 | unsigned space2 : 1; |
jksoft | 1:48f6e08a3ac2 | 38 | /* |
jksoft | 1:48f6e08a3ac2 | 39 | 3-4バイト目:左アナログ |
jksoft | 1:48f6e08a3ac2 | 40 | 左右: 1-255 (Neutral=128) |
jksoft | 1:48f6e08a3ac2 | 41 | 上下: 1-255 (Neutral=128) |
jksoft | 1:48f6e08a3ac2 | 42 | */ |
jksoft | 0:8c643bfe55b7 | 43 | unsigned LeftAnalogLR:8; |
jksoft | 0:8c643bfe55b7 | 44 | unsigned LeftAnalogUD:8; |
jksoft | 1:48f6e08a3ac2 | 45 | /* |
jksoft | 1:48f6e08a3ac2 | 46 | 5-6バイト目:右アナログ |
jksoft | 1:48f6e08a3ac2 | 47 | 左右: 1-255 (Neutral=128) |
jksoft | 1:48f6e08a3ac2 | 48 | 上下: 1-255 (Neutral=128) |
jksoft | 1:48f6e08a3ac2 | 49 | */ |
jksoft | 0:8c643bfe55b7 | 50 | unsigned RightAnalogLR:8; |
jksoft | 0:8c643bfe55b7 | 51 | unsigned RightAnalogUD:8; |
jksoft | 1:48f6e08a3ac2 | 52 | /* |
jksoft | 1:48f6e08a3ac2 | 53 | 7-9バイト目:アクセラレータ |
jksoft | 1:48f6e08a3ac2 | 54 | X軸: 1-255 (Neutral=128) |
jksoft | 1:48f6e08a3ac2 | 55 | Y軸: 1-255 (Neutral=128) |
jksoft | 1:48f6e08a3ac2 | 56 | Z軸: 1-255 (Neutral=128) |
jksoft | 1:48f6e08a3ac2 | 57 | */ |
jksoft | 0:8c643bfe55b7 | 58 | unsigned AcceleX:8; |
jksoft | 0:8c643bfe55b7 | 59 | unsigned AcceleY:8; |
jksoft | 0:8c643bfe55b7 | 60 | unsigned AcceleZ:8; |
jksoft | 1:48f6e08a3ac2 | 61 | /* |
jksoft | 1:48f6e08a3ac2 | 62 | 10バイト目:設定(向き、設定) |
jksoft | 1:48f6e08a3ac2 | 63 | 7-6bit目: アクセラレータ設定(0-3) |
jksoft | 1:48f6e08a3ac2 | 64 | 5bit目: 左アナログ(0-1) |
jksoft | 1:48f6e08a3ac2 | 65 | 4bit目: 右アナログ(0-1) |
jksoft | 1:48f6e08a3ac2 | 66 | 3-1bit目: iOSデバイス向き(1-4) |
jksoft | 1:48f6e08a3ac2 | 67 | */ |
jksoft | 0:8c643bfe55b7 | 68 | unsigned DEV_DIR:4; |
jksoft | 0:8c643bfe55b7 | 69 | unsigned RIGHT_ANALOG:1; |
jksoft | 0:8c643bfe55b7 | 70 | unsigned LEFT_ANALOG:1; |
jksoft | 0:8c643bfe55b7 | 71 | unsigned ACCELE_SETTING:2; |
jksoft | 0:8c643bfe55b7 | 72 | }status; |
jksoft | 0:8c643bfe55b7 | 73 | unsigned char data[10]; |
jksoft | 0:8c643bfe55b7 | 74 | }RCBController; |