Advertisement
Julien-Bernard

Transcription of IN report of WUP-028

Jan 27th, 2022
1,267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.89 KB | None | 0 0
  1. struct __attribute__((packed)) AdapterPortReport {
  2.     uint8_t controllerType;
  3.     uint8_t a:1; uint8_t b:1; uint8_t x:1; uint8_t y:1; uint8_t dLeft:1; uint8_t dRight:1; uint8_t dDown:1; uint8_t dUp:1;
  4.     uint8_t start : 1; uint8_t z:1; uint8_t r:1; uint8_t l : 1; uint8_t padding:4;
  5.     uint8_t xStick;
  6.     uint8_t yStick;
  7.     uint8_t cxStick;
  8.     uint8_t cyStick;
  9.     uint8_t analogL;
  10.     uint8_t analogR;
  11. };
  12.  
  13. const AdapterPortReport defaultAdapterPortReport = {
  14.     0x00, // 0x10 = connected
  15.     0, 0, 0, 0, 0, 0, 0, 0,
  16.     0,          0, 0, 0, 0,
  17.     128,
  18.     128,
  19.     128,
  20.     128,
  21.     128,
  22.     128
  23. };
  24.  
  25. struct __attribute__((packed)) AdapterReport {
  26.     uint8_t fixed;
  27.     AdapterPortReport portReports[4];
  28. };
  29.  
  30. const AdapterReport defaultAdapterReport = {
  31.     33,
  32.     { defaultAdapterPortReport, defaultAdapterPortReport, defaultAdapterPortReport, defaultAdapterPortReport }
  33. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement