mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-12-03 08:25:11 +00:00
Merge remote-tracking branch 'origin/develop' into xap
This commit is contained in:
commit
f67c679eb2
@ -757,7 +757,7 @@ size_t SPP::write(const uint8_t *data, size_t size) {
|
|||||||
void SPP::write(const uint8_t *data, size_t size) {
|
void SPP::write(const uint8_t *data, size_t size) {
|
||||||
#endif
|
#endif
|
||||||
for(uint8_t i = 0; i < size; i++) {
|
for(uint8_t i = 0; i < size; i++) {
|
||||||
if(sppIndex >= ARRAY_SIZE(sppOutputBuffer))
|
if(sppIndex >= sizeof (sppOutputBuffer) / sizeof (sppOutputBuffer[0]))
|
||||||
send(); // Send the current data in the buffer
|
send(); // Send the current data in the buffer
|
||||||
sppOutputBuffer[sppIndex++] = data[i]; // All the bytes are put into a buffer and then send using the send() function
|
sppOutputBuffer[sppIndex++] = data[i]; // All the bytes are put into a buffer and then send using the send() function
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ USB Usb;
|
|||||||
|
|
||||||
BTD Btd(&Usb); // You have to create the Bluetooth Dongle instance like so
|
BTD Btd(&Usb); // You have to create the Bluetooth Dongle instance like so
|
||||||
PS3BT *PS3[2]; // We will use this pointer to store the two instance, you can easily make it larger if you like, but it will use a lot of RAM!
|
PS3BT *PS3[2]; // We will use this pointer to store the two instance, you can easily make it larger if you like, but it will use a lot of RAM!
|
||||||
const uint8_t length = ARRAY_SIZE(PS3); // Get the lenght of the array
|
const uint8_t length = sizeof(PS3) / sizeof(PS3[0]); // Get the lenght of the array
|
||||||
bool printAngle[length];
|
bool printAngle[length];
|
||||||
bool oldControllerState[length];
|
bool oldControllerState[length];
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ USB Usb;
|
|||||||
|
|
||||||
BTD Btd(&Usb); // You have to create the Bluetooth Dongle instance like so
|
BTD Btd(&Usb); // You have to create the Bluetooth Dongle instance like so
|
||||||
WII *Wii[2]; // We will use this pointer to store the two instance, you can easily make it larger if you like, but it will use a lot of RAM!
|
WII *Wii[2]; // We will use this pointer to store the two instance, you can easily make it larger if you like, but it will use a lot of RAM!
|
||||||
const uint8_t length = ARRAY_SIZE(Wii); // Get the lenght of the array
|
const uint8_t length = sizeof(Wii) / sizeof(Wii[0]); // Get the lenght of the array
|
||||||
bool printAngle[length];
|
bool printAngle[length];
|
||||||
bool oldControllerState[length];
|
bool oldControllerState[length];
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ public:
|
|||||||
virtual void OnGamePadChanged(const GamePadEventData *evt);
|
virtual void OnGamePadChanged(const GamePadEventData *evt);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define RPT_GAMEPAD_LEN sizeof(GamePadEventData)
|
#define RPT_GAMEPAD_LEN sizeof(GamePadEventData)/sizeof(uint8_t)
|
||||||
|
|
||||||
class JoystickReportParser : public HIDReportParser
|
class JoystickReportParser : public HIDReportParser
|
||||||
{
|
{
|
||||||
|
@ -38,7 +38,7 @@ public:
|
|||||||
virtual void OnScaleChanged(const ScaleEventData *evt);
|
virtual void OnScaleChanged(const ScaleEventData *evt);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define RPT_SCALE_LEN sizeof(ScaleEventData)
|
#define RPT_SCALE_LEN sizeof(ScaleEventData)/sizeof(uint8_t)
|
||||||
|
|
||||||
class ScaleReportParser : public HIDReportParser
|
class ScaleReportParser : public HIDReportParser
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user