Advertisement
xerpi

Sicksaxis structa no alignment

Dec 4th, 2012
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.91 KB | None | 0 0
  1. #define SS_DATA_LEN   50
  2. #define SS_VENDOR_ID  0x054C //Sony Corp.
  3. #define SS_PRODUCT_ID 0x0268 //Sixaxis and DS3
  4.  
  5. struct SS_BUTTONS
  6. {
  7.     byte select   : 1;
  8.     byte L3       : 1;
  9.     byte R3       : 1;
  10.     byte start    : 1;
  11.     byte up       : 1;
  12.     byte right    : 1;
  13.     byte down     : 1;
  14.     byte left     : 1;
  15.     byte L2       : 1;
  16.     byte R2       : 1;
  17.     byte L1       : 1;
  18.     byte R1       : 1;
  19.     byte triangle : 1;
  20.     byte circle   : 1;
  21.     byte cross    : 1;
  22.     byte square   : 1;
  23.     byte PS       : 1;
  24.     byte not_used : 7;
  25. };
  26.  
  27. struct SS_ANALOG
  28. {
  29.     byte x;
  30.     byte y;
  31. };
  32.  
  33. struct SS_DPAD_SENSITIVE
  34. {
  35.     byte up;
  36.     byte right;
  37.     byte down;
  38.     byte left;
  39. };
  40.  
  41. struct SS_SHOULDER_SENSITIVE
  42. {
  43.     byte L2;
  44.     byte R2;
  45.     byte L1;
  46.     byte R1;
  47. };
  48.  
  49. struct SS_BUTTON_SENSITIVE
  50. {
  51.     byte triangle;
  52.     byte circle;
  53.     byte cross;
  54.     byte square;
  55. };
  56.  
  57. struct SS_MOTION
  58. {
  59.     u16 accX;
  60.     u16 accY;
  61.     u16 accZ;
  62.     u16 Zgyro;
  63. };
  64.  
  65. struct SS_GAMEPAD
  66. {
  67.     u16                            HIDdata;
  68.     byte                           unk0;
  69.     struct SS_BUTTONS              buttons;
  70.     byte                           unk1;
  71.     struct SS_ANALOG               leftAnalog;
  72.     struct SS_ANALOG               rightAnalog;
  73.     u32                            unk2;
  74.     struct SS_DPAD_SENSITIVE       dpad_sens;
  75.     struct SS_SHOULDER_SENSITIVE   shoulder_sens;
  76.     struct SS_BUTTON_SENSITIVE     button_sens;
  77.     u16                            unk3;
  78.     byte                           unk4;
  79.     byte                           status;
  80.     byte                           power_rating;
  81.     byte                           comm_status;
  82.     u32                            unk5;
  83.     u32                            unk6;
  84.     byte                           unk7;
  85.     struct SS_MOTION               motion;
  86.     //byte                           padding[16];
  87. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement