-
Go to the documentation of this file. 24 #define PS4_VID 0x054C // Sony Corporation 25 #define PS4_PID 0x05C4 // PS4 Controller 26 #define PS4_PID_SLIM 0x09CC // PS4 Slim Controller 56 pFuncOnInit = funcOnInit;
93 memset(buf, 0,
sizeof(buf));
123 virtual bool VIDPIDOK(uint16_t vid, uint16_t pid) {
129 void (*pFuncOnInit)(void);
virtual bool VIDPIDOK(uint16_t vid, uint16_t pid)
+
Go to the documentation of this file. 24 #define PS4_VID 0x054C // Sony Corporation 25 #define PS4_PID 0x05C4 // PS4 Controller 26 #define PS4_PID_SLIM 0x09CC // PS4 Slim Controller 56 pFuncOnInit = funcOnInit;
68 virtual void ParseHIDData(
USBHID *hid __attribute__((unused)),
bool is_rpt_id __attribute__((unused)), uint8_t len, uint8_t *buf) {
93 memset(buf, 0,
sizeof(buf));
123 virtual bool VIDPIDOK(uint16_t vid, uint16_t pid) {
129 void (*pFuncOnInit)(void);
virtual bool VIDPIDOK(uint16_t vid, uint16_t pid)
diff --git a/_p_s5_parser_8h_source.html b/_p_s5_parser_8h_source.html
index 0b92f0e4..254d0cbf 100644
--- a/_p_s5_parser_8h_source.html
+++ b/_p_s5_parser_8h_source.html
@@ -63,8 +63,7 @@ $(function() {
PS5Parser.h
-
Go to the documentation of this file. 77 } __attribute__((packed));
79 } __attribute__((packed));
87 } __attribute__((packed)) finger[2];
88 } __attribute__((packed));
101 } __attribute__((packed));
103 } __attribute__((packed));
127 #if 0 // The status byte depends on if it's sent via USB or Bluetooth, so is not parsed for now 130 uint8_t rightTriggerFeedback;
131 uint8_t leftTriggerFeedback;
132 uint8_t reserved4[10];
137 } __attribute__((packed));
146 } __attribute__((packed));
194 uint16_t
getX(uint8_t finger = 0) {
195 return ps5Data.xy.finger[finger].x;
203 uint16_t
getY(uint8_t finger = 0) {
204 return ps5Data.xy.finger[finger].y;
213 return !(ps5Data.xy.finger[finger].touching);
222 return ps5Data.xy.finger[finger].counter;
232 return (atan2f(-ps5Data.accY, -ps5Data.accZ) + PI) * RAD_TO_DEG;
234 return (atan2f(ps5Data.accX, -ps5Data.accZ) + PI) * RAD_TO_DEG;
245 return ps5Data.gyroX;
247 return ps5Data.gyroY;
249 return ps5Data.gyroZ;
261 #if 0 // Seems to only be available via Bluetooth, so have been disabled for now 266 uint8_t getBatteryLevel() {
267 return ps5Data.status.battery;
271 #if 0 // These are only valid via USB, so have been commented out for now 276 bool getUsbStatus() {
277 return ps5Data.status.usb;
284 bool getAudioStatus() {
285 return ps5Data.status.headphone;
292 bool getMicStatus() {
293 return ps5Data.status.mic;
314 setRumbleOn(0x00, 0xFF);
316 setRumbleOn(0xFF, 0x00);
325 ps5Output.bigRumble = bigRumble;
326 ps5Output.smallRumble = smallRumble;
327 ps5Output.reportChanged =
true;
339 void setLed(uint8_t r, uint8_t g, uint8_t b) {
343 ps5Output.reportChanged =
true;
351 setLed((uint8_t)(color >> 16), (uint8_t)(color >> 8), (uint8_t)(color));
364 ps5Output.playerLeds = mask;
365 ps5Output.reportChanged =
true;
378 ps5Output.microphoneLed = on ? 1 : 0;
379 ps5Output.reportChanged =
true;
384 return message_counter;
393 void Parse(uint8_t len, uint8_t *buf);
402 virtual void sendOutputReport(
PS5Output *output) = 0;
412 uint16_t message_counter = 0;
uint8_t getTouchCounter(uint8_t finger=00)
-
+
Go to the documentation of this file. 77 } __attribute__((packed));
79 } __attribute__((packed));
87 } __attribute__((packed)) finger[2];
88 } __attribute__((packed));
101 } __attribute__((packed));
103 } __attribute__((packed));
127 #if 0 // The status byte depends on if it's sent via USB or Bluetooth, so is not parsed for now 130 uint8_t rightTriggerFeedback;
131 uint8_t leftTriggerFeedback;
132 uint8_t reserved4[10];
137 } __attribute__((packed));
146 } __attribute__((packed));
194 uint16_t
getX(uint8_t finger = 0) {
195 return ps5Data.xy.finger[finger].x;
203 uint16_t
getY(uint8_t finger = 0) {
204 return ps5Data.xy.finger[finger].y;
213 return !(ps5Data.xy.finger[finger].touching);
222 return ps5Data.xy.finger[finger].counter;
232 return (atan2f(-ps5Data.accY, -ps5Data.accZ) + PI) * RAD_TO_DEG;
234 return (atan2f(ps5Data.accX, -ps5Data.accZ) + PI) * RAD_TO_DEG;
245 return ps5Data.gyroX;
247 return ps5Data.gyroY;
249 return ps5Data.gyroZ;
261 #if 0 // Seems to only be available via Bluetooth, so have been disabled for now 266 uint8_t getBatteryLevel() {
267 return ps5Data.status.battery;
271 #if 0 // These are only valid via USB, so have been commented out for now 276 bool getUsbStatus() {
277 return ps5Data.status.usb;
284 bool getAudioStatus() {
285 return ps5Data.status.headphone;
292 bool getMicStatus() {
293 return ps5Data.status.mic;
314 setRumbleOn(0x00, 0xFF);
316 setRumbleOn(0xFF, 0x00);
325 ps5Output.bigRumble = bigRumble;
326 ps5Output.smallRumble = smallRumble;
327 ps5Output.reportChanged =
true;
339 void setLed(uint8_t r, uint8_t g, uint8_t b) {
343 ps5Output.reportChanged =
true;
351 setLed((uint8_t)(color >> 16), (uint8_t)(color >> 8), (uint8_t)(color));
364 ps5Output.playerLeds = mask;
365 ps5Output.reportChanged =
true;
378 ps5Output.microphoneLed = on ? 1 : 0;
379 ps5Output.reportChanged =
true;
384 return message_counter;
393 void Parse(uint8_t len, uint8_t *buf);
402 virtual void sendOutputReport(
PS5Output *output) = 0;
412 uint16_t message_counter = 0;
uint16_t getX(uint8_t finger=0)
@@ -104,6 +103,7 @@ $(function() {
+
uint8_t getTouchCounter(uint8_t finger=0)
const uint8_t PS5_BUTTONS[]
diff --git a/_x_b_o_x_o_n_e_s_b_t_8h_source.html b/_x_b_o_x_o_n_e_s_b_t_8h_source.html
index d5152247..2d22ce99 100644
--- a/_x_b_o_x_o_n_e_s_b_t_8h_source.html
+++ b/_x_b_o_x_o_n_e_s_b_t_8h_source.html
@@ -63,21 +63,20 @@ $(function() {
XBOXONESBT.h
-
Go to the documentation of this file. 18 #ifndef _xboxonesbt_h_ 19 #define _xboxonesbt_h_ 80 uint8_t buf[nbytes + 2];
83 memcpy(buf + 2, data, nbytes);
+
Go to the documentation of this file. 18 #ifndef _xboxonesbt_h_ 19 #define _xboxonesbt_h_ 78 uint8_t buf[nbytes + 2];
81 memcpy(buf + 2, data, nbytes);
virtual void ParseBTHIDData(uint8_t len, uint8_t *buf)
uint8_t interrupt_scid[2]
-
virtual void sendOutputReport(uint8_t *data, uint8_t nbytes)
-
virtual void ResetBTHID()
+
virtual void sendOutputReport(uint8_t *data, uint8_t nbytes)
+
virtual void ResetBTHID()
void Parse(uint8_t len, uint8_t *buf)
XBOXONESBT(BTD *p, bool pair=false)
-
void(* pFuncOnInit)(void)
diff --git a/class_p_s4_b_t.html b/class_p_s4_b_t.html
index a4890637..b96a2eca 100644
--- a/class_p_s4_b_t.html
+++ b/class_p_s4_b_t.html
@@ -418,7 +418,7 @@ Additional Inherited Members
Reimplemented from BTHID.
-
Definition at line 75 of file PS4BT.h.
+
Definition at line 73 of file PS4BT.h.
@@ -454,7 +454,7 @@ Additional Inherited Members
Implements PS4Parser.
-
Definition at line 81 of file PS4BT.h.
+
Definition at line 79 of file PS4BT.h.
diff --git a/class_p_s5_b_t-members.html b/class_p_s5_b_t-members.html
index 0cd2614c..6ddc098c 100644
--- a/class_p_s5_b_t-members.html
+++ b/class_p_s5_b_t-members.html
@@ -83,7 +83,7 @@ $(function() {
getMessageCounter() | PS5Parser | inline |
GetReportParser(uint8_t id) | BTHID | inline |
getSensor(SensorEnum s) | PS5Parser | inline |
-
getTouchCounter(uint8_t finger=00) | PS5Parser | inline |
+
getTouchCounter(uint8_t finger=0) | PS5Parser | inline |
getX(uint8_t finger=0) | PS5Parser | inline |
getY(uint8_t finger=0) | PS5Parser | inline |
hci_handle | BluetoothService | protected |
diff --git a/class_p_s5_b_t.html b/class_p_s5_b_t.html
index 46c4366e..884b0764 100644
--- a/class_p_s5_b_t.html
+++ b/class_p_s5_b_t.html
@@ -141,8 +141,8 @@ Public Member Functions
|
bool | isTouching (uint8_t finger=0) |
|
-
uint8_t | getTouchCounter (uint8_t finger=00) |
-
|
+
uint8_t | getTouchCounter (uint8_t finger=0) |
+
|
float | getAngle (AngleEnum a) |
|
int16_t | getSensor (SensorEnum s) |
diff --git a/class_p_s5_parser-members.html b/class_p_s5_parser-members.html
index a6abaa46..867649b5 100644
--- a/class_p_s5_parser-members.html
+++ b/class_p_s5_parser-members.html
@@ -73,7 +73,7 @@ $(function() {
getButtonPress(ButtonEnum b) | PS5Parser | |
getMessageCounter() | PS5Parser | inline |
getSensor(SensorEnum s) | PS5Parser | inline |
-
getTouchCounter(uint8_t finger=00) | PS5Parser | inline |
+
getTouchCounter(uint8_t finger=0) | PS5Parser | inline |
getX(uint8_t finger=0) | PS5Parser | inline |
getY(uint8_t finger=0) | PS5Parser | inline |
isTouching(uint8_t finger=0) | PS5Parser | inline |
diff --git a/class_p_s5_parser.html b/class_p_s5_parser.html
index 22e44088..51b4416d 100644
--- a/class_p_s5_parser.html
+++ b/class_p_s5_parser.html
@@ -115,8 +115,8 @@ PS5 Controller functions
|
bool | isTouching (uint8_t finger=0) |
|
-
uint8_t | getTouchCounter (uint8_t finger=00) |
-
|
+
uint8_t | getTouchCounter (uint8_t finger=0) |
+
|
float | getAngle (AngleEnum a) |
|
int16_t | getSensor (SensorEnum s) |
@@ -402,8 +402,8 @@ PS5 Controller functions