Module hidapi
Available on crate feature
dep_sdl3
only.Expand description
Header file for SDL HIDAPI functions.
This is an adaptation of the original HIDAPI interface by Alan Ott, and includes source code licensed under the following license:
HIDAPI - Multi-Platform library for
communication with HID devices.
Copyright 2009, Alan Ott, Signal 11 Software.
All Rights Reserved.
This software may be used by anyone for any reason so
long as the copyright notice in the source files
remains intact.
(Note that this license is the same as item three of SDL’s zlib license, so it adds no new requirements on the user.)
If you would like a version of SDL without this code, you can build SDL with SDL_HIDAPI_DISABLED defined to 1. You might want to do this for example on iOS or tvOS to avoid a dependency on the CoreBluetooth framework.
Structs§
- SDL_
hid_ bus_ type - HID underlying bus types.
- SDL_
hid_ device - An opaque handle representing an open HID device.
- SDL_
hid_ device_ info - Information about a connected HID device
Constants§
- SDL_
HID_ API_ BUS_ BLUETOOTH - Bluetooth or Bluetooth LE bus Specifications: https://www.bluetooth.com/specifications/specs/human-interface-device-profile-1-1-1/ https://www.bluetooth.com/specifications/specs/hid-service-1-0/ https://www.bluetooth.com/specifications/specs/hid-over-gatt-profile-1-0/
- SDL_
HID_ API_ BUS_ I2C - I2C bus Specifications: https://docs.microsoft.com/previous-versions/windows/hardware/design/dn642101(v=vs.85)
- SDL_
HID_ API_ BUS_ SPI - SPI bus Specifications: https://www.microsoft.com/download/details.aspx?id=103325
- SDL_
HID_ API_ BUS_ UNKNOWN - Unknown bus type
- SDL_
HID_ API_ BUS_ USB - USB bus Specifications: https://usb.org/hid
Functions§
- SDL_
hid_ ⚠ble_ scan - Start or stop a BLE scan on iOS and tvOS to pair Steam Controllers.
- SDL_
hid_ ⚠close - Close a HID device.
- SDL_
hid_ ⚠device_ change_ count - Check to see if devices may have been added or removed.
- SDL_
hid_ ⚠enumerate - Enumerate the HID Devices.
- SDL_
hid_ ⚠exit - Finalize the HIDAPI library.
- SDL_
hid_ ⚠free_ enumeration - Free an enumeration linked list.
- SDL_
hid_ ⚠get_ device_ info - Get the device info from a HID device.
- SDL_
hid_ ⚠get_ feature_ report - Get a feature report from a HID device.
- SDL_
hid_ ⚠get_ indexed_ string - Get a string from a HID device, based on its string index.
- SDL_
hid_ ⚠get_ input_ report - Get an input report from a HID device.
- SDL_
hid_ ⚠get_ manufacturer_ string - Get The Manufacturer String from a HID device.
- SDL_
hid_ ⚠get_ product_ string - Get The Product String from a HID device.
- SDL_
hid_ ⚠get_ report_ descriptor - Get a report descriptor from a HID device.
- SDL_
hid_ ⚠get_ serial_ number_ string - Get The Serial Number String from a HID device.
- SDL_
hid_ ⚠init - Initialize the HIDAPI library.
- SDL_
hid_ ⚠open - Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally a serial number.
- SDL_
hid_ ⚠open_ path - Open a HID device by its path name.
- SDL_
hid_ ⚠read - Read an Input report from a HID device.
- SDL_
hid_ ⚠read_ timeout - Read an Input report from a HID device with timeout.
- SDL_
hid_ ⚠send_ feature_ report - Send a Feature report to the device.
- SDL_
hid_ ⚠set_ nonblocking - Set the device handle to be non-blocking.
- SDL_
hid_ ⚠write - Write an Output report to a HID device.