21 #if defined(ARDUINO) && ARDUINO >= 100
31 #define EP_MAXPKTSIZE 64 // max size for data via USB
34 #define EP_INTERRUPT 0x03
37 #define PS3_CONTROL_PIPE 0
38 #define PS3_OUTPUT_PIPE 1
39 #define PS3_INPUT_PIPE 2
42 #define PS3_VID 0x054C // Sony Corporation
43 #define PS3_PID 0x0268 // PS3 Controller DualShock 3
44 #define PS3NAVIGATION_PID 0x042F // Navigation controller
45 #define PS3MOVE_PID 0x03D5 // Motion controller
47 #define PS3_REPORT_BUFFER_SIZE 48 // Size of the output report buffer for the Dualshock and Navigation controllers
48 #define MOVE_REPORT_BUFFER_SIZE 7 // Size of the output report buffer for the Move Controller
51 #define bmREQ_HID_OUT USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE
52 #define HID_REQUEST_SET_REPORT 0x09
54 #define PS3_MAX_ENDPOINTS 3
73 PS3USB(
USB *
pUsb, uint8_t btadr5=0, uint8_t btadr4=0, uint8_t btadr3=0, uint8_t btadr2=0, uint8_t btadr1=0, uint8_t btadr0=0);
83 virtual uint8_t
Init(uint8_t parent, uint8_t port,
bool lowspeed);
93 virtual uint8_t
Poll();
103 virtual bool isReady() {
return bPollEnable; };
230 uint32_t ButtonState;
231 uint32_t OldButtonState;
232 uint32_t ButtonClickState;
234 uint8_t my_bdaddr[6];
242 void PS3_Command(uint8_t* data, uint16_t nbytes);
243 void enable_sixaxis();
244 void Move_Command(uint8_t* data, uint16_t nbytes);