OpenSourceSimWheelESP32
Open-source wireless steering wheel/button box for ESP32 boards
Loading...
Searching...
No Matches
internals::hid::common Namespace Reference

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 &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.
 
BatteryStatusChrData toBleBatteryStatus (const BatteryStatus &status)
 Convert a battery status to the data format required by the BAS specification (BLE only)
 

Detailed Description

Common functionality to all HID implementations.

Note
Implemented at file hidCommon.cpp

Function Documentation

◆ onGetFeature()

uint16_t internals::hid::common::onGetFeature ( uint8_t report_id,
uint8_t * buffer,
uint16_t len )

Send feature report.

Parameters
[in]report_idA valid report id
[out]bufferPointer to buffer to be sent
[in]lenSize of buffer
Returns
uint16_t Count of bytes put into buffer

◆ onOutput()

void internals::hid::common::onOutput ( uint8_t report_id,
const uint8_t * buffer,
uint16_t len )

Receive an output report.

Parameters
[in]report_idReport identification
[in]bufferPointer to buffer that contains received data
[in]lenSize of buffer

◆ onReportInput()

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.

Parameters
reportPointer to report buffer. Size is defined by GAMEPAD_REPORT_SIZE.
notifyConfigChangesTrue to notify changes in the device settings
inputsLowState of inputs (low-order bytes)
inputsHighState of inputs (high-order bytes)
POVstateState of the DPAD (aka "point of view")
leftAxisState of the left axis
rightAxisState of the right axis
clutchAxisState of the clutch axis

◆ onReset()

void internals::hid::common::onReset ( uint8_t * report)

Resets data for the input report.

Parameters
[out]reportPointer to report buffer. Size is defined by GAMEPAD_REPORT_SIZE.

◆ onSetFeature()

void internals::hid::common::onSetFeature ( uint8_t report_id,
const uint8_t * buffer,
uint16_t len )

Receive a feature report.

Parameters
[in]report_idReport identification
[in]bufferPointer to buffer that contains received data
[in]lenSize of buffer

◆ toBleBatteryStatus()

BatteryStatusChrData internals::hid::common::toBleBatteryStatus ( const BatteryStatus & status)

Convert a battery status to the data format required by the BAS specification (BLE only)

Parameters
statusBattery status
Returns
BatteryStatusChrData Converted battery status