OpenSourceSimWheelESP32
Open-source wireless steering wheel/button box for ESP32 boards
Loading...
Searching...
No Matches
HID_definitions.hpp File Reference

Key definitions of the sim wheel as a HID device. Independent from transport layer. More...

#include <cinttypes>

Go to the source code of this file.

Macros

#define RID_INPUT_GAMEPAD   0x01
 Input report ID.
 
#define RID_FEATURE_CAPABILITIES   0x02
 Capabilities report ID.
 
#define RID_FEATURE_CONFIG   0x03
 Configuration report ID.
 
#define RID_FEATURE_BUTTONS_MAP   0x04
 Input map report ID.
 
#define RID_FEATURE_HARDWARE_ID   0x05
 Custom VID/PID report ID.
 
#define RID_OUTPUT_POWERTRAIN   0x14
 Powertrain telemetry report ID.
 
#define RID_OUTPUT_ECU   0x15
 ECU telemetry report ID.
 
#define RID_OUTPUT_RACE_CONTROL   0x16
 Race control report ID.
 
#define RID_OUTPUT_GAUGES   0x17
 Gauges report ID.
 
#define RID_OUTPUT_PIXEL   0x1E
 Pixel control report ID.
 
#define GAMEPAD_REPORT_SIZE   20
 Input report size.
 
#define CAPABILITIES_REPORT_SIZE   20
 Capabilities report size.
 
#define CONFIG_REPORT_SIZE   7
 Configuration report size.
 
#define BUTTONS_MAP_REPORT_SIZE   3
 Input map report size.
 
#define HARDWARE_ID_REPORT_SIZE   6
 Custom VID/PID report size.
 
#define POWERTRAIN_REPORT_SIZE   10
 Powertrain telemetry report size.
 
#define ECU_REPORT_SIZE   9
 ECU telemetry report size.
 
#define RACE_CONTROL_REPORT_SIZE   11
 Race control report size.
 
#define GAUGES_REPORT_SIZE   12
 Gauges report size.
 
#define PIXEL_REPORT_SIZE   6
 Pixel control report size.
 
#define CONTROLLER_TYPE_GAMEPAD   0x05
 Gamepad usage constant.
 
#define CONTROLLER_TYPE_JOYSTICK   0x04
 Joystick usage constant.
 
#define BUTTON_COUNT   128
 Button count in the input report.
 
#define BLE_VENDOR_SOURCE   0x00
 Vendor source constant.
 
#define BLE_VENDOR_ID   0x1d50
 Default BLE vendor ID.
 
#define BLE_PRODUCT_ID   0xffff
 Default BLE product ID.
 
#define TEST_HARDWARE_ID   0xffff
 Flag not to load the stored hardware ID.
 
#define BLE_SERIAL_NUMBER_CHR_UUID   0x2A25
 Assigned Number to the "Serial Number String" characteristic.
 
#define BLE_BATTERY_STATUS_CHR_UUID   0x2BED
 Assigned Number to the "Battery level status" characteristic.
 
#define BLE_MTU_SIZE   GAMEPAD_REPORT_SIZE + 1 + 14
 MTU size for BLE.
 
#define PRODUCT_REVISION   0x0100
 Default product revision.
 
#define DATA_MAJOR_VERSION   1
 Major version of the data exchange protocol.
 
#define DATA_MINOR_VERSION   6
 Minor version of the data exchange protocol.
 
#define MAGIC_NUMBER_LOW   0x51
 Low order word of the magic number.
 
#define MAGIC_NUMBER_HIGH   0xBF
 High order word of the magic number.
 

Detailed Description

Key definitions of the sim wheel as a HID device. Independent from transport layer.

Author
Ángel Fernández Pineda. Madrid. Spain.
Date
2022-12-17

Definition in file HID_definitions.hpp.

Macro Definition Documentation

◆ BLE_BATTERY_STATUS_CHR_UUID

#define BLE_BATTERY_STATUS_CHR_UUID   0x2BED

Assigned Number to the "Battery level status" characteristic.

Definition at line 104 of file HID_definitions.hpp.

◆ BLE_MTU_SIZE

#define BLE_MTU_SIZE   GAMEPAD_REPORT_SIZE + 1 + 14

MTU size for BLE.

Definition at line 111 of file HID_definitions.hpp.

◆ BLE_PRODUCT_ID

#define BLE_PRODUCT_ID   0xffff

Default BLE product ID.

Definition at line 98 of file HID_definitions.hpp.

◆ BLE_SERIAL_NUMBER_CHR_UUID

#define BLE_SERIAL_NUMBER_CHR_UUID   0x2A25

Assigned Number to the "Serial Number String" characteristic.

Definition at line 102 of file HID_definitions.hpp.

◆ BLE_VENDOR_ID

#define BLE_VENDOR_ID   0x1d50

Default BLE vendor ID.

Definition at line 96 of file HID_definitions.hpp.

◆ BLE_VENDOR_SOURCE

#define BLE_VENDOR_SOURCE   0x00

Vendor source constant.

Definition at line 94 of file HID_definitions.hpp.

◆ BUTTON_COUNT

#define BUTTON_COUNT   128

Button count in the input report.

Definition at line 87 of file HID_definitions.hpp.

◆ BUTTONS_MAP_REPORT_SIZE

#define BUTTONS_MAP_REPORT_SIZE   3

Input map report size.

Definition at line 59 of file HID_definitions.hpp.

◆ CAPABILITIES_REPORT_SIZE

#define CAPABILITIES_REPORT_SIZE   20

Capabilities report size.

Definition at line 55 of file HID_definitions.hpp.

◆ CONFIG_REPORT_SIZE

#define CONFIG_REPORT_SIZE   7

Configuration report size.

Definition at line 57 of file HID_definitions.hpp.

◆ CONTROLLER_TYPE_GAMEPAD

#define CONTROLLER_TYPE_GAMEPAD   0x05

Gamepad usage constant.

Definition at line 78 of file HID_definitions.hpp.

◆ CONTROLLER_TYPE_JOYSTICK

#define CONTROLLER_TYPE_JOYSTICK   0x04

Joystick usage constant.

Definition at line 80 of file HID_definitions.hpp.

◆ DATA_MAJOR_VERSION

#define DATA_MAJOR_VERSION   1

Major version of the data exchange protocol.

Definition at line 125 of file HID_definitions.hpp.

◆ DATA_MINOR_VERSION

#define DATA_MINOR_VERSION   6

Minor version of the data exchange protocol.

Definition at line 127 of file HID_definitions.hpp.

◆ ECU_REPORT_SIZE

#define ECU_REPORT_SIZE   9

ECU telemetry report size.

Definition at line 65 of file HID_definitions.hpp.

◆ GAMEPAD_REPORT_SIZE

#define GAMEPAD_REPORT_SIZE   20

Input report size.

Definition at line 53 of file HID_definitions.hpp.

◆ GAUGES_REPORT_SIZE

#define GAUGES_REPORT_SIZE   12

Gauges report size.

Definition at line 69 of file HID_definitions.hpp.

◆ HARDWARE_ID_REPORT_SIZE

#define HARDWARE_ID_REPORT_SIZE   6

Custom VID/PID report size.

Definition at line 61 of file HID_definitions.hpp.

◆ MAGIC_NUMBER_HIGH

#define MAGIC_NUMBER_HIGH   0xBF

High order word of the magic number.

Definition at line 136 of file HID_definitions.hpp.

◆ MAGIC_NUMBER_LOW

#define MAGIC_NUMBER_LOW   0x51

Low order word of the magic number.

Definition at line 134 of file HID_definitions.hpp.

◆ PIXEL_REPORT_SIZE

#define PIXEL_REPORT_SIZE   6

Pixel control report size.

Definition at line 71 of file HID_definitions.hpp.

◆ POWERTRAIN_REPORT_SIZE

#define POWERTRAIN_REPORT_SIZE   10

Powertrain telemetry report size.

Definition at line 63 of file HID_definitions.hpp.

◆ PRODUCT_REVISION

#define PRODUCT_REVISION   0x0100

Default product revision.

Definition at line 118 of file HID_definitions.hpp.

◆ RACE_CONTROL_REPORT_SIZE

#define RACE_CONTROL_REPORT_SIZE   11

Race control report size.

Definition at line 67 of file HID_definitions.hpp.

◆ RID_FEATURE_BUTTONS_MAP

#define RID_FEATURE_BUTTONS_MAP   0x04

Input map report ID.

Definition at line 33 of file HID_definitions.hpp.

◆ RID_FEATURE_CAPABILITIES

#define RID_FEATURE_CAPABILITIES   0x02

Capabilities report ID.

Definition at line 29 of file HID_definitions.hpp.

◆ RID_FEATURE_CONFIG

#define RID_FEATURE_CONFIG   0x03

Configuration report ID.

Definition at line 31 of file HID_definitions.hpp.

◆ RID_FEATURE_HARDWARE_ID

#define RID_FEATURE_HARDWARE_ID   0x05

Custom VID/PID report ID.

Definition at line 35 of file HID_definitions.hpp.

◆ RID_INPUT_GAMEPAD

#define RID_INPUT_GAMEPAD   0x01

Input report ID.

Definition at line 27 of file HID_definitions.hpp.

◆ RID_OUTPUT_ECU

#define RID_OUTPUT_ECU   0x15

ECU telemetry report ID.

Definition at line 40 of file HID_definitions.hpp.

◆ RID_OUTPUT_GAUGES

#define RID_OUTPUT_GAUGES   0x17

Gauges report ID.

Definition at line 44 of file HID_definitions.hpp.

◆ RID_OUTPUT_PIXEL

#define RID_OUTPUT_PIXEL   0x1E

Pixel control report ID.

Definition at line 46 of file HID_definitions.hpp.

◆ RID_OUTPUT_POWERTRAIN

#define RID_OUTPUT_POWERTRAIN   0x14

Powertrain telemetry report ID.

Definition at line 38 of file HID_definitions.hpp.

◆ RID_OUTPUT_RACE_CONTROL

#define RID_OUTPUT_RACE_CONTROL   0x16

Race control report ID.

Definition at line 42 of file HID_definitions.hpp.

◆ TEST_HARDWARE_ID

#define TEST_HARDWARE_ID   0xffff

Flag not to load the stored hardware ID.

Definition at line 100 of file HID_definitions.hpp.