mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Merge pull request #682 from felis/fix_sequence_counter
Fix the sequence counter in the PS5BT output report
This commit is contained in:
commit
0b2dc021a2
1 changed files with 1 additions and 3 deletions
4
PS5BT.h
4
PS5BT.h
|
@ -168,9 +168,7 @@ protected:
|
||||||
buf[0] = 0xA2; // HID BT DATA (0xA0) | Report Type (Output 0x02)
|
buf[0] = 0xA2; // HID BT DATA (0xA0) | Report Type (Output 0x02)
|
||||||
|
|
||||||
buf[0x01] = 0x31; // Report ID
|
buf[0x01] = 0x31; // Report ID
|
||||||
buf[0x02] = (output_sequence_counter << 4) | 0x0; // Highest 4-bit is a sequence number, which needs to be increased every report. Lowest 4-bit is tag and can be zero for now.
|
buf[0x02] = (output_sequence_counter++ << 4) | 0x0; // Highest 4-bit is a sequence number, which needs to be increased every report. Lowest 4-bit is tag and can be zero for now.
|
||||||
if(++output_sequence_counter == 15)
|
|
||||||
output_sequence_counter = 0;
|
|
||||||
buf[0x03] = 0x10; // Magic number must be set to 0x10
|
buf[0x03] = 0x10; // Magic number must be set to 0x10
|
||||||
|
|
||||||
buf[0x01 + 3] = 0xFF; // feature flags 1
|
buf[0x01 + 3] = 0xFF; // feature flags 1
|
||||||
|
|
Loading…
Reference in a new issue