SDL_hid_bus_type(3type)

πŸ’– SDL_hid_bus_type πŸ’–

okay bestie, welcome to the SDL_hid_bus_type(3type) page β€” it's a datatype from the SDL3 manual, filed under SDL3 DATATYPES, and it's genuinely one of the cutest little enums you'll ever meet. no cap.


✨ NAME ✨

SDL_hid_bus_type β€” HID underlying bus types. that's it, that's the whole vibe. it's the enum that tells you which bus a HID device is riding in on. 🚌


🌸 SYNOPSIS 🌸

so here's the whole thing, verbatim, no edits, we do not touch the code:

#include <SDL3/SDL_hidapi.h>

typedef enum SDL_hid_bus_type {
    /** Unknown bus type */
    SDL_HID_API_BUS_UNKNOWN = 0x00,

    /** USB bus
       Specifications:
       https://usb.org/hid */
    SDL_HID_API_BUS_USB = 0x01,

    /** 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_BLUETOOTH = 0x02,

    /** I2C bus
       Specifications:
       https://docs.microsoft.com/previous-versions/windows/hardware/design/dn642101(v=vs.85) */
    SDL_HID_API_BUS_I2C = 0x03,

    /** SPI bus
       Specifications:
       https://www.microsoft.com/download/details.aspx?id=103325 */
    SDL_HID_API_BUS_SPI = 0x04

} SDL_hid_bus_type;

πŸŽ€ DESCRIPTION πŸŽ€

okay so listen. this enum is literally just a list of buses β€” as in, the physical-ish way your HID device is talking to your computer. it's giving "which road did you take to get here" energy. and there are exactly five (5) options, so let's go through them one by one, bestie, no skipping. πŸ’…

πŸ¦‹ the members πŸ¦‹

  • SDL_HID_API_BUS_UNKNOWN = 0x00 β€” unknown bus type. the mystery era. we do not know how this thing is connected and honestly? we're at peace with that. πŸ™ˆ
  • SDL_HID_API_BUS_USB = 0x01 β€” the USB bus. classic. iconic. plugged in like a good little peripheral. πŸ”Œ

Specifications:

  • SDL_HID_API_BUS_BLUETOOTH = 0x02 β€” the Bluetooth or Bluetooth LE bus. wireless, unbothered, thriving, no cables in sight. πŸ¦‹βœ¨

Specifications:

  • SDL_HID_API_BUS_I2C = 0x03 β€” the I2C bus. tiny wires, big feelings, usually hiding inside your laptop somewhere being mysterious and low-power. πŸ“

Specifications:

  • SDL_HID_API_BUS_SPI = 0x04 β€” the SPI bus. fast, chatty, four wires and a dream. also the last member in the enum, so no trailing comma situation, we respect the formatting. ⭐

Specifications:

ngl, if you're pattern-matching on these values: they're 0x00 through 0x04, in that order, and SDL_HID_API_BUS_SPI is the last one. write that down. πŸ“

πŸ‘‘ AVAILABILITY πŸ‘‘

this enum is available since SDL 3.2.0. so if you're on anything older, bestie, it's simply not going to be there. upgrade era. πŸ’€


🫢 SEE ALSO 🫢

(this page doesn't list any SEE ALSO references β€” so it's just us here. main character energy. ✨)


okay that's the whole page, you ate it, you understood it, periodt. πŸŽ€ this little love letter was brought to you by Simple Directmedia Layer, version SDL 3.4.18, for SDL_hid_bus_type(3type) β€” mwah, bye bestie πŸ’–πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from