24 #define HID_BUFFERSIZE 50 // Size of the buffer for the Playstation Motion Controller
28 #define L2CAP_CONTROL_REQUEST 1
29 #define L2CAP_CONTROL_SUCCESS 2
30 #define L2CAP_INTERRUPT_SETUP 3
31 #define L2CAP_INTERRUPT_REQUEST 4
32 #define L2CAP_INTERRUPT_SUCCESS 5
33 #define L2CAP_HID_ENABLE_SIXAXIS 6
34 #define L2CAP_HID_PS3_LED 7
36 #define L2CAP_INTERRUPT_DISCONNECT 9
37 #define L2CAP_CONTROL_DISCONNECT 10
40 #define L2CAP_FLAG_CONNECTION_CONTROL_REQUEST 0x01
41 #define L2CAP_FLAG_CONFIG_CONTROL_REQUEST 0x02
42 #define L2CAP_FLAG_CONFIG_CONTROL_SUCCESS 0x04
43 #define L2CAP_FLAG_CONNECTION_INTERRUPT_REQUEST 0x08
44 #define L2CAP_FLAG_CONFIG_INTERRUPT_REQUEST 0x10
45 #define L2CAP_FLAG_CONFIG_INTERRUPT_SUCCESS 0x20
46 #define L2CAP_FLAG_DISCONNECT_CONTROL_RESPONSE 0x40
47 #define L2CAP_FLAG_DISCONNECT_INTERRUPT_RESPONSE 0x80
50 #define l2cap_connection_request_control_flag (l2cap_event_flag & L2CAP_FLAG_CONNECTION_CONTROL_REQUEST)
51 #define l2cap_config_request_control_flag (l2cap_event_flag & L2CAP_FLAG_CONFIG_CONTROL_REQUEST)
52 #define l2cap_config_success_control_flag (l2cap_event_flag & L2CAP_FLAG_CONFIG_CONTROL_SUCCESS)
53 #define l2cap_connection_request_interrupt_flag (l2cap_event_flag & L2CAP_FLAG_CONNECTION_INTERRUPT_REQUEST)
54 #define l2cap_config_request_interrupt_flag (l2cap_event_flag & L2CAP_FLAG_CONFIG_INTERRUPT_REQUEST)
55 #define l2cap_config_success_interrupt_flag (l2cap_event_flag & L2CAP_FLAG_CONFIG_INTERRUPT_SUCCESS)
56 #define l2cap_disconnect_response_control_flag (l2cap_event_flag & L2CAP_FLAG_DISCONNECT_CONTROL_RESPONSE)
57 #define l2cap_disconnect_response_interrupt_flag (l2cap_event_flag & L2CAP_FLAG_DISCONNECT_INTERRUPT_RESPONSE)
74 PS3BT(
BTD *pBtd, uint8_t btadr5 = 0, uint8_t btadr4 = 0, uint8_t btadr3 = 0, uint8_t btadr2 = 0, uint8_t btadr1 = 0, uint8_t btadr0 = 0);
172 void setRumbleOn(uint8_t rightDuration, uint8_t rightPower, uint8_t leftDuration, uint8_t leftPower);
220 pFuncOnInit = funcOnInit;
241 void (*pFuncOnInit)(void);
247 uint8_t remote_name[30];
248 bool activeConnection;
252 uint16_t l2cap_event_flag;
256 uint32_t ButtonState;
257 uint32_t OldButtonState;
258 uint32_t ButtonClickState;
261 uint32_t timerBulbRumble;
268 uint8_t control_scid[2];
269 uint8_t control_dcid[2];
270 uint8_t interrupt_scid[2];
271 uint8_t interrupt_dcid[2];
275 void HID_Command(uint8_t* data, uint8_t nbytes);
276 void HIDMove_Command(uint8_t* data, uint8_t nbytes);
277 void enable_sixaxis();
uint8_t getAnalogHat(AnalogHat a)
bool getButtonClick(Button b)
bool PS3NavigationConnected
void moveSetRumble(uint8_t rumble)
int16_t getSensor(Sensor a)
double get9DOFValues(Sensor a)
void attachOnInit(void(*funcOnInit)(void))
void moveSetBulb(uint8_t r, uint8_t g, uint8_t b)
virtual void ACLData(uint8_t *ACLData)
void setRumbleOn(Rumble mode)
virtual void disconnect()
uint8_t getAnalogButton(Button a)
void setLedRaw(uint8_t value)
PS3BT(BTD *pBtd, uint8_t btadr5=0, uint8_t btadr4=0, uint8_t btadr3=0, uint8_t btadr2=0, uint8_t btadr1=0, uint8_t btadr0=0)
bool getButtonPress(Button b)