Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_RCBController by
RCBController.h
- Committer:
- jksoft
- Date:
- 2014-08-20
- Revision:
- 1:48f6e08a3ac2
- Parent:
- 0:8c643bfe55b7
File content as of revision 1:48f6e08a3ac2:
typedef union
{
struct {
/*
1-2バイト目:ボタン
UP: 0x0001
DOWN: 0x0002
RIGHT: 0x0004
LEFT: 0x0008
Y button: 0x0010
A button: 0x0020
B button: 0x0040
X button: 0x0100
L1: 0x0200
L2: 0x0400
R1: 0x0800
R2: 0x1000
START: 0x0003
SELECT: 0x000C
*/
unsigned X : 1;
unsigned L1 : 1;
unsigned L2 : 1;
unsigned R1 : 1;
unsigned R2 : 1;
unsigned space1 : 3;
unsigned UP : 1;
unsigned DOWN : 1;
unsigned RIGHT : 1;
unsigned LEFT : 1;
unsigned Y : 1;
unsigned A : 1;
unsigned B : 1;
unsigned space2 : 1;
/*
3-4バイト目:左アナログ
左右: 1-255 (Neutral=128)
上下: 1-255 (Neutral=128)
*/
unsigned LeftAnalogLR:8;
unsigned LeftAnalogUD:8;
/*
5-6バイト目:右アナログ
左右: 1-255 (Neutral=128)
上下: 1-255 (Neutral=128)
*/
unsigned RightAnalogLR:8;
unsigned RightAnalogUD:8;
/*
7-9バイト目:アクセラレータ
X軸: 1-255 (Neutral=128)
Y軸: 1-255 (Neutral=128)
Z軸: 1-255 (Neutral=128)
*/
unsigned AcceleX:8;
unsigned AcceleY:8;
unsigned AcceleZ:8;
/*
10バイト目:設定(向き、設定)
7-6bit目: アクセラレータ設定(0-3)
5bit目: 左アナログ(0-1)
4bit目: 右アナログ(0-1)
3-1bit目: iOSデバイス向き(1-4)
*/
unsigned DEV_DIR:4;
unsigned RIGHT_ANALOG:1;
unsigned LEFT_ANALOG:1;
unsigned ACCELE_SETTING:2;
}status;
unsigned char data[10];
}RCBController;
