Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed FastIO FastPWM USBDevice
Diff: USBJoystick/USBJoystick.cpp
- Revision:
- 92:f264fbaa1be5
- Parent:
- 90:aa4e571da8e8
- Child:
- 98:4df3c0f7e707
--- a/USBJoystick/USBJoystick.cpp Fri Oct 20 06:21:40 2017 +0000
+++ b/USBJoystick/USBJoystick.cpp Thu Dec 14 00:20:20 2017 +0000
@@ -358,7 +358,8 @@
bool USBJoystick::reportConfig(
int numOutputs, int unitNo,
int plungerZero, int plungerMax, int plungerRlsTime,
- bool configured, bool sbxpbx, bool newAccelFeatures, bool flashStatusFeature,
+ bool configured, bool sbxpbx, bool newAccelFeatures,
+ bool flashStatusFeature, bool reportTimingFeatures,
size_t freeHeapBytes)
{
HID_REPORT report;
@@ -384,11 +385,15 @@
// write the status bits:
// 0x01 -> configuration loaded
// 0x02 -> SBX/PBX protocol extensions supported
+ // 0x04 -> new accelerometer features supported
+ // 0x08 -> flash status feature supported
+ // 0x10 -> joystick report timing features supported
report.data[11] =
(configured ? 0x01 : 0x00)
| (sbxpbx ? 0x02 : 0x00)
| (newAccelFeatures ? 0x04 : 0x00)
- | (flashStatusFeature ? 0x08 : 0x00);
+ | (flashStatusFeature ? 0x08 : 0x00)
+ | (reportTimingFeatures ? 0x10 : 0x00);
// write the free heap space
put(12, freeHeapBytes);