mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Reorganized ButtonEnum list
Trying to form a more logical order based on how these are used.
This commit is contained in:
parent
26c66f455e
commit
5753cc661a
1 changed files with 73 additions and 56 deletions
|
@ -77,7 +77,7 @@ enum RumbleEnum {
|
|||
/** This enum is used to read all the different buttons on the different controllers */
|
||||
enum ButtonEnum {
|
||||
/**@{*/
|
||||
/** These buttons are available on all the the controllers */
|
||||
/** Directional Pad Buttons - available on most controllers */
|
||||
UP = 0,
|
||||
RIGHT = 1,
|
||||
DOWN = 2,
|
||||
|
@ -85,71 +85,32 @@ enum ButtonEnum {
|
|||
/**@}*/
|
||||
|
||||
/**@{*/
|
||||
/** Wii buttons */
|
||||
PLUS,
|
||||
TWO,
|
||||
ONE,
|
||||
MINUS,
|
||||
HOME,
|
||||
Z,
|
||||
C,
|
||||
B,
|
||||
A,
|
||||
/**@}*/
|
||||
|
||||
/**@{*/
|
||||
/** These are only available on the Wii U Pro Controller */
|
||||
L,
|
||||
R,
|
||||
ZL,
|
||||
ZR,
|
||||
/**@}*/
|
||||
|
||||
/**@{*/
|
||||
/** PS3 controllers buttons */
|
||||
SELECT,
|
||||
START,
|
||||
L3,
|
||||
R3,
|
||||
|
||||
L2,
|
||||
R2,
|
||||
L1,
|
||||
R1,
|
||||
/** Playstation buttons */
|
||||
TRIANGLE,
|
||||
CIRCLE,
|
||||
CROSS,
|
||||
SQUARE,
|
||||
|
||||
PS,
|
||||
SELECT,
|
||||
START,
|
||||
|
||||
L3,
|
||||
R3,
|
||||
|
||||
L1,
|
||||
R1,
|
||||
L2,
|
||||
R2,
|
||||
|
||||
PS,
|
||||
/**@}*/
|
||||
|
||||
/**@{*/
|
||||
/** PS3 Move Controller */
|
||||
MOVE, // Covers 12 bits - we only need to read the top 8
|
||||
T, // Covers 12 bits - we only need to read the top 8
|
||||
/**@}*/
|
||||
|
||||
/** PS4 controllers buttons - SHARE and OPTIONS are present instead of SELECT and START */
|
||||
SHARE,
|
||||
OPTIONS,
|
||||
TOUCHPAD,
|
||||
/**@}*/
|
||||
|
||||
/**@{*/
|
||||
/** Xbox buttons */
|
||||
BACK,
|
||||
X,
|
||||
Y,
|
||||
XBOX,
|
||||
SYNC,
|
||||
BLACK, // Available on the original Xbox controller
|
||||
WHITE, // Available on the original Xbox controller
|
||||
/**@}*/
|
||||
|
||||
/**@{*/
|
||||
/** Xbox One S buttons */
|
||||
VIEW,
|
||||
MENU,
|
||||
/**@}*/
|
||||
|
||||
/**@{*/
|
||||
/** PS Buzz controllers */
|
||||
RED,
|
||||
|
@ -159,11 +120,67 @@ enum ButtonEnum {
|
|||
BLUE,
|
||||
/**@}*/
|
||||
|
||||
/**@{*/
|
||||
/** PS4 buttons - SHARE and OPTIONS are present instead of SELECT and START */
|
||||
SHARE,
|
||||
OPTIONS,
|
||||
TOUCHPAD,
|
||||
/**@}*/
|
||||
|
||||
/**@{*/
|
||||
/** PS5 buttons */
|
||||
CREATE,
|
||||
MICROPHONE,
|
||||
/**@}*/
|
||||
|
||||
/**@{*/
|
||||
/** Xbox buttons */
|
||||
A,
|
||||
B,
|
||||
X,
|
||||
Y,
|
||||
|
||||
BACK,
|
||||
// START, // listed under Playstation buttons
|
||||
|
||||
// L1, // listed under Playstation buttons
|
||||
// R1, // listed under Playstation buttons
|
||||
// L2, // listed under Playstation buttons
|
||||
// R2, // listed under Playstation buttons
|
||||
|
||||
XBOX,
|
||||
SYNC,
|
||||
|
||||
BLACK, // Available on the original Xbox controller
|
||||
WHITE, // Available on the original Xbox controller
|
||||
/**@}*/
|
||||
|
||||
/**@{*/
|
||||
/** Xbox One S buttons */
|
||||
VIEW,
|
||||
MENU,
|
||||
/**@}*/
|
||||
|
||||
/**@{*/
|
||||
/** Wii buttons */
|
||||
PLUS,
|
||||
TWO,
|
||||
ONE,
|
||||
MINUS,
|
||||
HOME,
|
||||
Z,
|
||||
C,
|
||||
// B, // listed under Xbox buttons
|
||||
// A, // listed under Xbox buttons
|
||||
/**@}*/
|
||||
|
||||
/**@{*/
|
||||
/** Wii U Pro Controller */
|
||||
L,
|
||||
R,
|
||||
ZL,
|
||||
ZR,
|
||||
/**@}*/
|
||||
};
|
||||
|
||||
inline uint8_t legacyButtonValues(ButtonEnum key) {
|
||||
|
|
Loading…
Reference in a new issue