Skip to content

Commit 39d6187

Browse files
authored
Merge pull request #99 from adafruit/update-gamepad
update gamepad example sketch
2 parents d7eadba + 5eeabd6 commit 39d6187

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

changelog.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Adafruit TinyUSB Arduino Library Changelog
22

3+
## 1.1.0 - 2021.06.21
4+
5+
- Add support for multiple CDC ports (need to modify tusb_config.h)
6+
- fix #86 when calling midi API when device is not fully enumerated
7+
- fix Serial connection issue with nrf52 on windows
8+
- Update device driver of rp2040 to match tinyusb upstream
9+
- Added feather rp2040 to ci build (skipped the external flash example for now due to SdFat compilation error)
10+
- Add optional debug log for stack with Serial1 on samd core (will expand later to other core).
11+
- lost more bug fixes to the stack
12+
13+
## 1.0.3 - 2021.05.26
14+
15+
- Update tinyusb stack to latest
16+
- Added HID Gamepad example with Dhat support
17+
- Fix warnings with -Wall -Wextra
18+
- Fix warnings with cast function type for nrf
19+
320
## 1.0.1 - 2021.05.21
421

522
Warn user to select TinyUSB via menu on ports where it is optional e.g SAMD and RP2040

examples/HID/hid_gamepad/hid_gamepad.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,11 @@ void loop()
241241
delay(2000);
242242

243243

244-
// Test buttons
245-
for (int i=0; i<=15; ++i)
244+
// Test buttons (up to 32 buttons)
245+
for (int i=0; i<32; ++i)
246246
{
247-
Serial.print("Pressing button "); Serial.println(i+1);
248-
gp.buttons = (0x00 | TU_BIT(i));
247+
Serial.print("Pressing button "); Serial.println(i);
248+
gp.buttons = (1U << i);
249249
usb_hid.sendReport(0, &gp, sizeof(gp));
250250
delay(1000);
251251
}

0 commit comments

Comments
 (0)