USB Host Shield 2.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Enumerations | Variables
PS3Enums.h File Reference
#include "controllerEnums.h"
Include dependency graph for PS3Enums.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PS3_REPORT_BUFFER_SIZE   48
 
#define MOVE_REPORT_BUFFER_SIZE   7
 

Enumerations

enum  ColorsEnum {
  Red = 0xFF0000, Green = 0xFF00, Blue = 0xFF, Yellow = 0xFFEB04,
  Lightblue = 0xFFFF, Purble = 0xFF00FF, White = 0xFFFFFF, Off = 0x00
}
 
enum  SensorEnum {
  aX = 50, aY = 52, aZ = 54, gZ = 56,
  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 }
 
enum  StatusEnum {
  Plugged = (38 << 8) | 0x02, Unplugged = (38 << 8) | 0x03, Charging = (39 << 8) | 0xEE, NotCharging = (39 << 8) | 0xF1,
  Shutdown = (39 << 8) | 0x01, Dying = (39 << 8) | 0x02, Low = (39 << 8) | 0x03, High = (39 << 8) | 0x04,
  Full = (39 << 8) | 0x05, MoveCharging = (21 << 8) | 0xEE, MoveNotCharging = (21 << 8) | 0xF1, MoveShutdown = (21 << 8) | 0x01,
  MoveDying = (21 << 8) | 0x02, MoveLow = (21 << 8) | 0x03, MoveHigh = (21 << 8) | 0x04, MoveFull = (21 << 8) | 0x05,
  CableRumble = (40 << 8) | 0x10, Cable = (40 << 8) | 0x12, BluetoothRumble = (40 << 8) | 0x14, Bluetooth = (40 << 8) | 0x16
}
 
enum  RumbleEnum { RumbleHigh = 0x10, RumbleLow = 0x20 }
 

Variables

const uint8_t PS3_REPORT_BUFFER [PS3_REPORT_BUFFER_SIZE]
 
const uint8_t PS3_LEDS []
 
const uint32_t PS3_BUTTONS []
 
const uint8_t PS3_ANALOG_BUTTONS []
 

Macro Definition Documentation

#define PS3_REPORT_BUFFER_SIZE   48

Size of the output report buffer for the Dualshock and Navigation controllers

Definition at line 24 of file PS3Enums.h.

#define MOVE_REPORT_BUFFER_SIZE   7

Size of the output report buffer for the Move Controller

Definition at line 40 of file PS3Enums.h.

Enumeration Type Documentation

enum ColorsEnum

Used to set the colors of the move 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

Purble 

r = 255, g = 0, b = 255

White 

r = 255, g = 255, b = 255

Off 

r = 0, g = 0, b = 0

Definition at line 116 of file PS3Enums.h.

enum SensorEnum

Sensors inside the Sixaxis Dualshock 3 and Move controller.

Note: that the location is shifted 9 when it's connected via USB.

Enumerator
aX 

Accelerometer x-axis

aY 

Accelerometer y-axis

aZ 

Accelerometer z-axis

gZ 

Gyro z-axis

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 142 of file PS3Enums.h.

enum AngleEnum

Used to get the angle calculated using the accelerometer.

Enumerator
Pitch 
Roll 

Definition at line 178 of file PS3Enums.h.

enum StatusEnum
Enumerator
Plugged 
Unplugged 
Charging 
NotCharging 
Shutdown 
Dying 
Low 
High 
Full 
MoveCharging 
MoveNotCharging 
MoveShutdown 
MoveDying 
MoveLow 
MoveHigh 
MoveFull 
CableRumble 
Cable 
BluetoothRumble 
Bluetooth 

Definition at line 183 of file PS3Enums.h.

enum RumbleEnum
Enumerator
RumbleHigh 
RumbleLow 

Definition at line 211 of file PS3Enums.h.

Variable Documentation

const uint8_t PS3_REPORT_BUFFER[PS3_REPORT_BUFFER_SIZE]
Initial value:
= {
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0x27, 0x10, 0x00, 0x32,
0xff, 0x27, 0x10, 0x00, 0x32,
0xff, 0x27, 0x10, 0x00, 0x32,
0xff, 0x27, 0x10, 0x00, 0x32,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}

Report buffer for all PS3 commands

Definition at line 27 of file PS3Enums.h.

const uint8_t PS3_LEDS[]
Initial value:
= {
0x00,
0x01,
0x02,
0x04,
0x08,
0x09,
0x0A,
0x0C,
0x0D,
0x0E,
0x0F,
}

Used to set the LEDs on the controllers

Definition at line 43 of file PS3Enums.h.

const uint32_t PS3_BUTTONS[]
Initial value:
= {
0x10,
0x20,
0x40,
0x80,
0x01,
0x08,
0x02,
0x04,
0x0100,
0x0200,
0x0400,
0x0800,
0x1000,
0x2000,
0x4000,
0x8000,
0x010000,
0x080000,
0x100000,
}

Buttons on the controllers

Note: that the location is shifted 9 when it's connected via USB.

Definition at line 63 of file PS3Enums.h.

const uint8_t PS3_ANALOG_BUTTONS[]
Initial value:
= {
23,
24,
25,
26,
0, 0, 0, 0,
27,
28,
29,
30,
31,
32,
33,
34,
0, 0,
15,
}

Analog buttons on the controllers

Note: that the location is shifted 9 when it's connected via USB.

Definition at line 94 of file PS3Enums.h.