USB Host Shield 2.0
Enumerations | Functions
controllerEnums.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  LEDEnum {
  OFF = 0, LED1 = 1, LED2 = 2, LED3 = 3,
  LED4 = 4, LED5 = 5, LED6 = 6, LED7 = 7,
  LED8 = 8, LED9 = 9, LED10 = 10, ALL = 5
}
 
enum  ColorsEnum {
  Red = 0xFF0000, Green = 0xFF00, Blue = 0xFF, Yellow = 0xFFEB04,
  Lightblue = 0xFFFF, Purple = 0xFF00FF, Purble = 0xFF00FF, White = 0xFFFFFF,
  Off = 0x00
}
 
enum  RumbleEnum { RumbleHigh = 0x10, RumbleLow = 0x20 }
 
enum  ButtonEnum {
  UP = 0, RIGHT = 1, DOWN = 2, LEFT = 3,
  TRIANGLE, CIRCLE, CROSS, SQUARE,
  SELECT, START, L3, R3,
  L1, R1, L2, R2,
  PS, MOVE, T, RED,
  YELLOW, GREEN, ORANGE, BLUE,
  SHARE, OPTIONS, TOUCHPAD, CREATE,
  MICROPHONE, A, B, X,
  Y, BACK, XBOX, SYNC,
  BLACK, WHITE, VIEW, MENU,
  PLUS, TWO, ONE, MINUS,
  HOME, Z, C, L,
  R, ZL, ZR
}
 
enum  AnalogHatEnum { LeftHatX = 0, LeftHatY = 1, RightHatX = 2, RightHatY = 3 }
 
enum  SensorEnum {
  aX = 50, aY = 52, aZ = 54, gZ = 56,
  gX, gY, aXmove = 28, aZmove = 30,
  aYmove = 32, gXmove = 40, gZmove = 42, gYmove = 44,
  tempMove = 46, mXmove = 47, mZmove = 49, mYmove = 50
}
 
enum  AngleEnum { Pitch = 0x01, Roll = 0x02 }
 

Functions

constexpr int8_t ButtonIndex (ButtonEnum key)
 

Enumeration Type Documentation

◆ LEDEnum

enum LEDEnum

This header file is used to store different enums for the controllers, This is necessary so all the different libraries can be used at once. Enum used to turn on the LEDs on the different controllers.

Enumerator
OFF 
LED1 
LED2 
LED3 
LED4 
LED5 
LED6 
LED7 
LED8 
LED9 
LED10 
ALL 

Used to blink all LEDs on the Xbox controller

Definition at line 31 of file controllerEnums.h.

◆ ColorsEnum

enum ColorsEnum

Used to set the colors of the Move and PS4 controller.

Enumerator
Red 

r = 255, g = 0, b = 0

Green 

r = 0, g = 255, b = 0

Blue 

r = 0, g = 0, b = 255

Yellow 

r = 255, g = 235, b = 4

Lightblue 

r = 0, g = 255, b = 255

Purple 

r = 255, g = 0, b = 255

Purble 
White 

r = 255, g = 255, b = 255

Off 

r = 0, g = 0, b = 0

Definition at line 50 of file controllerEnums.h.

◆ RumbleEnum

enum RumbleEnum
Enumerator
RumbleHigh 
RumbleLow 

Definition at line 72 of file controllerEnums.h.

◆ ButtonEnum

enum ButtonEnum

This enum is used to read all the different buttons on the different controllers

Enumerator
UP 

Directional Pad Buttons - available on most controllers

RIGHT 

Directional Pad Buttons - available on most controllers

DOWN 

Directional Pad Buttons - available on most controllers

LEFT 

Directional Pad Buttons - available on most controllers

TRIANGLE 

Playstation buttons

CIRCLE 

Playstation buttons

CROSS 

Playstation buttons

SQUARE 

Playstation buttons

SELECT 

Playstation buttons

START 

Playstation buttons

L3 

Playstation buttons

R3 

Playstation buttons

L1 

Playstation buttons

R1 

Playstation buttons

L2 

Playstation buttons

R2 

Playstation buttons

PS 

Playstation buttons

MOVE 

PS3 Move Controller

PS3 Move Controller

RED 

PS Buzz controllers

YELLOW 

PS Buzz controllers

GREEN 

PS Buzz controllers

ORANGE 

PS Buzz controllers

BLUE 

PS Buzz controllers

SHARE 

PS4 buttons - SHARE and OPTIONS are present instead of SELECT and START

OPTIONS 

PS4 buttons - SHARE and OPTIONS are present instead of SELECT and START

TOUCHPAD 

PS4 buttons - SHARE and OPTIONS are present instead of SELECT and START

CREATE 

PS5 buttons

MICROPHONE 

PS5 buttons

Xbox buttons

Xbox buttons

Xbox buttons

Xbox buttons

BACK 

Xbox buttons

XBOX 

Xbox buttons

SYNC 

Xbox buttons

BLACK 

Xbox buttons

WHITE 

Xbox buttons

VIEW 

Xbox One S buttons

MENU 

Xbox One S buttons

PLUS 

Wii buttons

TWO 

Wii buttons

ONE 

Wii buttons

MINUS 

Wii buttons

HOME 

Wii buttons

Wii buttons

Wii buttons

Wii U Pro Controller

Wii U Pro Controller

ZL 

Wii U Pro Controller

ZR 

Wii U Pro Controller

Definition at line 78 of file controllerEnums.h.

◆ AnalogHatEnum

Joysticks on the PS3 and Xbox controllers.

Enumerator
LeftHatX 

Left joystick x-axis

LeftHatY 

Left joystick y-axis

RightHatX 

Right joystick x-axis

RightHatY 

Right joystick y-axis

Definition at line 213 of file controllerEnums.h.

◆ SensorEnum

enum SensorEnum

Sensors inside the Sixaxis Dualshock 3, Move controller and PS4 controller. Note: that the location is shifted 9 when it's connected via USB on the PS3 controller.

Enumerator
aX 

Accelerometer values

aY 
aZ 
gZ 

Gyro z-axis

gX 
gY 
aXmove 

Accelerometer x-axis

aZmove 

Accelerometer z-axis

aYmove 

Accelerometer y-axis

gXmove 

Gyro x-axis

gZmove 

Gyro z-axis

gYmove 

Gyro y-axis

tempMove 

Temperature sensor

mXmove 

Magnetometer x-axis

mZmove 

Magnetometer z-axis

mYmove 

Magnetometer y-axis

Definition at line 228 of file controllerEnums.h.

◆ AngleEnum

enum AngleEnum

Used to get the angle calculated using the PS3 controller and PS4 controller.

Enumerator
Pitch 
Roll 

Definition at line 261 of file controllerEnums.h.

Function Documentation

◆ ButtonIndex()

constexpr int8_t ButtonIndex ( ButtonEnum  key)
inlineconstexpr

Definition at line 186 of file controllerEnums.h.