USBJoystick updated for 32 buttons and added wait-for-connect.

Dependents:   joy2

Revision:
3:1f1c9178c55e
Parent:
2:de0ca539fa79
--- a/USBJoystick.h	Sun Aug 01 11:49:38 2021 +0000
+++ b/USBJoystick.h	Sun Aug 01 17:20:34 2021 +0000
@@ -168,7 +168,7 @@
        * @param hat hat state 0 (up), 1 (right, 2 (down), 3 (left) or 4 (neutral)
        * @returns true if there is no error, false otherwise
        */
-     bool update(int16_t t, int16_t r, int16_t x, int16_t y, uint32_t buttons, uint8_t hat);
+        bool update(int16_t t, int16_t r, int16_t x, int16_t y, uint16_t z, uint16_t rx, uint16_t ry, uint16_t rz, uint32_t buttons, uint8_t hat);
 
      /**
        * Write state of the joystick
@@ -230,6 +230,11 @@
      int16_t _r;              
      int16_t _x;                       
      int16_t _y;     
+     int16_t _z;     
+     int16_t _rx;     
+     int16_t _ry;
+     int16_t _rz;     
+     
      uint32_t _buttons;
      uint8_t _hat;