![]() |
OpenSourceSimWheelESP32
Open-source wireless steering wheel/button box for ESP32 boards
|
Common functionality to all HID implementations. More...
Functions | |
| void | getReady () |
| Prepare to run. | |
| uint16_t | onGetFeature (uint8_t report_id, uint8_t *buffer, uint16_t len) |
| Send feature report. | |
| void | onSetFeature (uint8_t report_id, const uint8_t *buffer, uint16_t len) |
| Receive a feature report. | |
| void | onOutput (uint8_t report_id, const uint8_t *buffer, uint16_t len) |
| Receive an output report. | |
| void | onReset (uint8_t *report) |
| Resets data for the input report. | |
| void | onReportInput (uint8_t *report, bool ¬ifyConfigChanges, uint64_t &inputsLow, uint64_t &inputsHigh, uint8_t &POVstate, uint8_t &leftAxis, uint8_t &rightAxis, uint8_t &clutchAxis) |
| Sets data for the input report. | |
| BatteryStatusChrData | toBleBatteryStatus (const BatteryStatus &status) |
| Convert a battery status to the data format required by the BAS specification (BLE only) | |
Common functionality to all HID implementations.
hidCommon.cpp | uint16_t internals::hid::common::onGetFeature | ( | uint8_t | report_id, |
| uint8_t * | buffer, | ||
| uint16_t | len ) |
Send feature report.
| [in] | report_id | A valid report id |
| [out] | buffer | Pointer to buffer to be sent |
| [in] | len | Size of buffer |
buffer | void internals::hid::common::onOutput | ( | uint8_t | report_id, |
| const uint8_t * | buffer, | ||
| uint16_t | len ) |
Receive an output report.
| [in] | report_id | Report identification |
| [in] | buffer | Pointer to buffer that contains received data |
| [in] | len | Size of buffer |
| void internals::hid::common::onReportInput | ( | uint8_t * | report, |
| bool & | notifyConfigChanges, | ||
| uint64_t & | inputsLow, | ||
| uint64_t & | inputsHigh, | ||
| uint8_t & | POVstate, | ||
| uint8_t & | leftAxis, | ||
| uint8_t & | rightAxis, | ||
| uint8_t & | clutchAxis ) |
Sets data for the input report.
| report | Pointer to report buffer. Size is defined by GAMEPAD_REPORT_SIZE. |
| notifyConfigChanges | True to notify changes in the device settings |
| inputsLow | State of inputs (low-order bytes) |
| inputsHigh | State of inputs (high-order bytes) |
| POVstate | State of the DPAD (aka "point of view") |
| leftAxis | State of the left axis |
| rightAxis | State of the right axis |
| clutchAxis | State of the clutch axis |
| void internals::hid::common::onReset | ( | uint8_t * | report | ) |
Resets data for the input report.
| [out] | report | Pointer to report buffer. Size is defined by GAMEPAD_REPORT_SIZE. |
| void internals::hid::common::onSetFeature | ( | uint8_t | report_id, |
| const uint8_t * | buffer, | ||
| uint16_t | len ) |
Receive a feature report.
| [in] | report_id | Report identification |
| [in] | buffer | Pointer to buffer that contains received data |
| [in] | len | Size of buffer |
| BatteryStatusChrData internals::hid::common::toBleBatteryStatus | ( | const BatteryStatus & | status | ) |
Convert a battery status to the data format required by the BAS specification (BLE only)
| status | Battery status |