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
48 #define bmREQ_HID_OUT USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE
49 #define HID_REQUEST_SET_REPORT 0x09
51 #define PS3_MAX_ENDPOINTS 3
70 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);
80 virtual uint8_t
Init(uint8_t parent, uint8_t port,
bool lowspeed);
90 virtual uint8_t
Poll();
189 void setRumbleOn(uint8_t rightDuration, uint8_t rightPower, uint8_t leftDuration, uint8_t leftPower);
249 uint32_t ButtonState;
250 uint32_t OldButtonState;
251 uint32_t ButtonClickState;
253 uint8_t my_bdaddr[6];
261 void PS3_Command(uint8_t* data, uint16_t nbytes);
262 void enable_sixaxis();
263 void Move_Command(uint8_t* data, uint16_t nbytes);