SDL_hidapi.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  1. /*
  2. Simple DirectMedia Layer
  3. Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
  4. This software is provided 'as-is', without any express or implied
  5. warranty. In no event will the authors be held liable for any damages
  6. arising from the use of this software.
  7. Permission is granted to anyone to use this software for any purpose,
  8. including commercial applications, and to alter it and redistribute it
  9. freely, subject to the following restrictions:
  10. 1. The origin of this software must not be misrepresented; you must not
  11. claim that you wrote the original software. If you use this software
  12. in a product, an acknowledgment in the product documentation would be
  13. appreciated but is not required.
  14. 2. Altered source versions must be plainly marked as such, and must not be
  15. misrepresented as being the original software.
  16. 3. This notice may not be removed or altered from any source distribution.
  17. */
  18. /**
  19. * \file SDL_hidapi.h
  20. *
  21. * Header file for SDL HIDAPI functions.
  22. *
  23. * This is an adaptation of the original HIDAPI interface by Alan Ott,
  24. * and includes source code licensed under the following BSD license:
  25. *
  26. Copyright (c) 2010, Alan Ott, Signal 11 Software
  27. All rights reserved.
  28. Redistribution and use in source and binary forms, with or without
  29. modification, are permitted provided that the following conditions are met:
  30. * Redistributions of source code must retain the above copyright notice,
  31. this list of conditions and the following disclaimer.
  32. * Redistributions in binary form must reproduce the above copyright
  33. notice, this list of conditions and the following disclaimer in the
  34. documentation and/or other materials provided with the distribution.
  35. * Neither the name of Signal 11 Software nor the names of its
  36. contributors may be used to endorse or promote products derived from
  37. this software without specific prior written permission.
  38. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  39. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  40. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  41. ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
  42. LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  43. CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  44. SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  45. INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  46. CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  47. ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  48. POSSIBILITY OF SUCH DAMAGE.
  49. *
  50. * If you would like a version of SDL without this code, you can build SDL
  51. * with SDL_HIDAPI_DISABLED defined to 1. You might want to do this for example
  52. * on iOS or tvOS to avoid a dependency on the CoreBluetooth framework.
  53. */
  54. #ifndef SDL_hidapi_h_
  55. #define SDL_hidapi_h_
  56. #include <SDL3/SDL_stdinc.h>
  57. #include <SDL3/SDL_error.h>
  58. #include <SDL3/SDL_begin_code.h>
  59. /* Set up for C function definitions, even when using C++ */
  60. #ifdef __cplusplus
  61. extern "C" {
  62. #endif
  63. /**
  64. * A handle representing an open HID device
  65. *
  66. * \since This struct is available since SDL 3.0.0.
  67. */
  68. struct SDL_hid_device;
  69. typedef struct SDL_hid_device SDL_hid_device; /**< opaque hidapi structure */
  70. /**
  71. * HID underlying bus types.
  72. *
  73. * \since This enum is available since SDL 3.0.0.
  74. */
  75. typedef enum SDL_hid_bus_type {
  76. /** Unknown bus type */
  77. SDL_HID_API_BUS_UNKNOWN = 0x00,
  78. /** USB bus
  79. Specifications:
  80. https://usb.org/hid */
  81. SDL_HID_API_BUS_USB = 0x01,
  82. /** Bluetooth or Bluetooth LE bus
  83. Specifications:
  84. https://www.bluetooth.com/specifications/specs/human-interface-device-profile-1-1-1/
  85. https://www.bluetooth.com/specifications/specs/hid-service-1-0/
  86. https://www.bluetooth.com/specifications/specs/hid-over-gatt-profile-1-0/ */
  87. SDL_HID_API_BUS_BLUETOOTH = 0x02,
  88. /** I2C bus
  89. Specifications:
  90. https://docs.microsoft.com/previous-versions/windows/hardware/design/dn642101(v=vs.85) */
  91. SDL_HID_API_BUS_I2C = 0x03,
  92. /** SPI bus
  93. Specifications:
  94. https://www.microsoft.com/download/details.aspx?id=103325 */
  95. SDL_HID_API_BUS_SPI = 0x04
  96. } SDL_hid_bus_type;
  97. /** hidapi info structure */
  98. /**
  99. * Information about a connected HID device
  100. *
  101. * \since This struct is available since SDL 3.0.0.
  102. */
  103. typedef struct SDL_hid_device_info
  104. {
  105. /** Platform-specific device path */
  106. char *path;
  107. /** Device Vendor ID */
  108. unsigned short vendor_id;
  109. /** Device Product ID */
  110. unsigned short product_id;
  111. /** Serial Number */
  112. wchar_t *serial_number;
  113. /** Device Release Number in binary-coded decimal,
  114. also known as Device Version Number */
  115. unsigned short release_number;
  116. /** Manufacturer String */
  117. wchar_t *manufacturer_string;
  118. /** Product string */
  119. wchar_t *product_string;
  120. /** Usage Page for this Device/Interface
  121. (Windows/Mac/hidraw only) */
  122. unsigned short usage_page;
  123. /** Usage for this Device/Interface
  124. (Windows/Mac/hidraw only) */
  125. unsigned short usage;
  126. /** The USB interface which this logical device
  127. represents.
  128. Valid only if the device is a USB HID device.
  129. Set to -1 in all other cases.
  130. */
  131. int interface_number;
  132. /** Additional information about the USB interface.
  133. Valid on libusb and Android implementations. */
  134. int interface_class;
  135. int interface_subclass;
  136. int interface_protocol;
  137. /** Underlying bus type */
  138. SDL_hid_bus_type bus_type;
  139. /** Pointer to the next device */
  140. struct SDL_hid_device_info *next;
  141. } SDL_hid_device_info;
  142. /**
  143. * Initialize the HIDAPI library.
  144. *
  145. * This function initializes the HIDAPI library. Calling it is not strictly
  146. * necessary, as it will be called automatically by SDL_hid_enumerate() and
  147. * any of the SDL_hid_open_*() functions if it is needed. This function should
  148. * be called at the beginning of execution however, if there is a chance of
  149. * HIDAPI handles being opened by different threads simultaneously.
  150. *
  151. * Each call to this function should have a matching call to SDL_hid_exit()
  152. *
  153. * \returns 0 on success or a negative error code on failure; call
  154. * SDL_GetError() for more information.
  155. *
  156. * \since This function is available since SDL 3.0.0.
  157. *
  158. * \sa SDL_hid_exit
  159. */
  160. extern DECLSPEC int SDLCALL SDL_hid_init(void);
  161. /**
  162. * Finalize the HIDAPI library.
  163. *
  164. * This function frees all of the static data associated with HIDAPI. It
  165. * should be called at the end of execution to avoid memory leaks.
  166. *
  167. * \returns 0 on success or a negative error code on failure; call
  168. * SDL_GetError() for more information.
  169. *
  170. * \since This function is available since SDL 3.0.0.
  171. *
  172. * \sa SDL_hid_init
  173. */
  174. extern DECLSPEC int SDLCALL SDL_hid_exit(void);
  175. /**
  176. * Check to see if devices may have been added or removed.
  177. *
  178. * Enumerating the HID devices is an expensive operation, so you can call this
  179. * to see if there have been any system device changes since the last call to
  180. * this function. A change in the counter returned doesn't necessarily mean
  181. * that anything has changed, but you can call SDL_hid_enumerate() to get an
  182. * updated device list.
  183. *
  184. * Calling this function for the first time may cause a thread or other system
  185. * resource to be allocated to track device change notifications.
  186. *
  187. * \returns a change counter that is incremented with each potential device
  188. * change, or 0 if device change detection isn't available.
  189. *
  190. * \since This function is available since SDL 3.0.0.
  191. *
  192. * \sa SDL_hid_enumerate
  193. */
  194. extern DECLSPEC Uint32 SDLCALL SDL_hid_device_change_count(void);
  195. /**
  196. * Enumerate the HID Devices.
  197. *
  198. * This function returns a linked list of all the HID devices attached to the
  199. * system which match vendor_id and product_id. If `vendor_id` is set to 0
  200. * then any vendor matches. If `product_id` is set to 0 then any product
  201. * matches. If `vendor_id` and `product_id` are both set to 0, then all HID
  202. * devices will be returned.
  203. *
  204. * By default SDL will only enumerate controllers, to reduce risk of hanging
  205. * or crashing on bad drivers, but SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS
  206. * can be set to "0" to enumerate all HID devices.
  207. *
  208. * \param vendor_id The Vendor ID (VID) of the types of device to open, or 0
  209. * to match any vendor.
  210. * \param product_id The Product ID (PID) of the types of device to open, or 0
  211. * to match any product.
  212. * \returns a pointer to a linked list of type SDL_hid_device_info, containing
  213. * information about the HID devices attached to the system, or NULL
  214. * in the case of failure. Free this linked list by calling
  215. * SDL_hid_free_enumeration().
  216. *
  217. * \since This function is available since SDL 3.0.0.
  218. *
  219. * \sa SDL_hid_device_change_count
  220. */
  221. extern DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_enumerate(unsigned short vendor_id, unsigned short product_id);
  222. /**
  223. * Free an enumeration linked list.
  224. *
  225. * This function frees a linked list created by SDL_hid_enumerate().
  226. *
  227. * \param devs Pointer to a list of struct_device returned from
  228. * SDL_hid_enumerate().
  229. *
  230. * \since This function is available since SDL 3.0.0.
  231. */
  232. extern DECLSPEC void SDLCALL SDL_hid_free_enumeration(SDL_hid_device_info *devs);
  233. /**
  234. * Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally
  235. * a serial number.
  236. *
  237. * If `serial_number` is NULL, the first device with the specified VID and PID
  238. * is opened.
  239. *
  240. * \param vendor_id The Vendor ID (VID) of the device to open.
  241. * \param product_id The Product ID (PID) of the device to open.
  242. * \param serial_number The Serial Number of the device to open (Optionally
  243. * NULL).
  244. * \returns a pointer to a SDL_hid_device object on success or NULL on
  245. * failure.
  246. *
  247. * \since This function is available since SDL 3.0.0.
  248. */
  249. extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number);
  250. /**
  251. * Open a HID device by its path name.
  252. *
  253. * The path name be determined by calling SDL_hid_enumerate(), or a
  254. * platform-specific path name can be used (eg: /dev/hidraw0 on Linux).
  255. *
  256. * \param path The path name of the device to open
  257. * \returns a pointer to a SDL_hid_device object on success or NULL on
  258. * failure.
  259. *
  260. * \since This function is available since SDL 3.0.0.
  261. */
  262. extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open_path(const char *path);
  263. /**
  264. * Write an Output report to a HID device.
  265. *
  266. * The first byte of `data` must contain the Report ID. For devices which only
  267. * support a single report, this must be set to 0x0. The remaining bytes
  268. * contain the report data. Since the Report ID is mandatory, calls to
  269. * SDL_hid_write() will always contain one more byte than the report contains.
  270. * For example, if a hid report is 16 bytes long, 17 bytes must be passed to
  271. * SDL_hid_write(), the Report ID (or 0x0, for devices with a single report),
  272. * followed by the report data (16 bytes). In this example, the length passed
  273. * in would be 17.
  274. *
  275. * SDL_hid_write() will send the data on the first OUT endpoint, if one
  276. * exists. If it does not, it will send the data through the Control Endpoint
  277. * (Endpoint 0).
  278. *
  279. * \param dev A device handle returned from SDL_hid_open().
  280. * \param data The data to send, including the report number as the first
  281. * byte.
  282. * \param length The length in bytes of the data to send.
  283. * \returns the actual number of bytes written and -1 on error.
  284. *
  285. * \since This function is available since SDL 3.0.0.
  286. */
  287. extern DECLSPEC int SDLCALL SDL_hid_write(SDL_hid_device *dev, const unsigned char *data, size_t length);
  288. /**
  289. * Read an Input report from a HID device with timeout.
  290. *
  291. * Input reports are returned to the host through the INTERRUPT IN endpoint.
  292. * The first byte will contain the Report number if the device uses numbered
  293. * reports.
  294. *
  295. * \param dev A device handle returned from SDL_hid_open().
  296. * \param data A buffer to put the read data into.
  297. * \param length The number of bytes to read. For devices with multiple
  298. * reports, make sure to read an extra byte for the report
  299. * number.
  300. * \param milliseconds timeout in milliseconds or -1 for blocking wait.
  301. * \returns the actual number of bytes read and -1 on error. If no packet was
  302. * available to be read within the timeout period, this function
  303. * returns 0.
  304. *
  305. * \since This function is available since SDL 3.0.0.
  306. */
  307. extern DECLSPEC int SDLCALL SDL_hid_read_timeout(SDL_hid_device *dev, unsigned char *data, size_t length, int milliseconds);
  308. /**
  309. * Read an Input report from a HID device.
  310. *
  311. * Input reports are returned to the host through the INTERRUPT IN endpoint.
  312. * The first byte will contain the Report number if the device uses numbered
  313. * reports.
  314. *
  315. * \param dev A device handle returned from SDL_hid_open().
  316. * \param data A buffer to put the read data into.
  317. * \param length The number of bytes to read. For devices with multiple
  318. * reports, make sure to read an extra byte for the report
  319. * number.
  320. * \returns the actual number of bytes read and -1 on error. If no packet was
  321. * available to be read and the handle is in non-blocking mode, this
  322. * function returns 0.
  323. *
  324. * \since This function is available since SDL 3.0.0.
  325. */
  326. extern DECLSPEC int SDLCALL SDL_hid_read(SDL_hid_device *dev, unsigned char *data, size_t length);
  327. /**
  328. * Set the device handle to be non-blocking.
  329. *
  330. * In non-blocking mode calls to SDL_hid_read() will return immediately with a
  331. * value of 0 if there is no data to be read. In blocking mode, SDL_hid_read()
  332. * will wait (block) until there is data to read before returning.
  333. *
  334. * Nonblocking can be turned on and off at any time.
  335. *
  336. * \param dev A device handle returned from SDL_hid_open().
  337. * \param nonblock enable or not the nonblocking reads - 1 to enable
  338. * nonblocking - 0 to disable nonblocking.
  339. * \returns 0 on success or a negative error code on failure; call
  340. * SDL_GetError() for more information.
  341. *
  342. * \since This function is available since SDL 3.0.0.
  343. */
  344. extern DECLSPEC int SDLCALL SDL_hid_set_nonblocking(SDL_hid_device *dev, int nonblock);
  345. /**
  346. * Send a Feature report to the device.
  347. *
  348. * Feature reports are sent over the Control endpoint as a Set_Report
  349. * transfer. The first byte of `data` must contain the Report ID. For devices
  350. * which only support a single report, this must be set to 0x0. The remaining
  351. * bytes contain the report data. Since the Report ID is mandatory, calls to
  352. * SDL_hid_send_feature_report() will always contain one more byte than the
  353. * report contains. For example, if a hid report is 16 bytes long, 17 bytes
  354. * must be passed to SDL_hid_send_feature_report(): the Report ID (or 0x0, for
  355. * devices which do not use numbered reports), followed by the report data (16
  356. * bytes). In this example, the length passed in would be 17.
  357. *
  358. * \param dev A device handle returned from SDL_hid_open().
  359. * \param data The data to send, including the report number as the first
  360. * byte.
  361. * \param length The length in bytes of the data to send, including the report
  362. * number.
  363. * \returns the actual number of bytes written and -1 on error.
  364. *
  365. * \since This function is available since SDL 3.0.0.
  366. */
  367. extern DECLSPEC int SDLCALL SDL_hid_send_feature_report(SDL_hid_device *dev, const unsigned char *data, size_t length);
  368. /**
  369. * Get a feature report from a HID device.
  370. *
  371. * Set the first byte of `data` to the Report ID of the report to be read.
  372. * Make sure to allow space for this extra byte in `data`. Upon return, the
  373. * first byte will still contain the Report ID, and the report data will start
  374. * in data[1].
  375. *
  376. * \param dev A device handle returned from SDL_hid_open().
  377. * \param data A buffer to put the read data into, including the Report ID.
  378. * Set the first byte of `data` to the Report ID of the report to
  379. * be read, or set it to zero if your device does not use numbered
  380. * reports.
  381. * \param length The number of bytes to read, including an extra byte for the
  382. * report ID. The buffer can be longer than the actual report.
  383. * \returns the number of bytes read plus one for the report ID (which is
  384. * still in the first byte), or -1 on error.
  385. *
  386. * \since This function is available since SDL 3.0.0.
  387. */
  388. extern DECLSPEC int SDLCALL SDL_hid_get_feature_report(SDL_hid_device *dev, unsigned char *data, size_t length);
  389. /**
  390. * Get an input report from a HID device.
  391. *
  392. * Set the first byte of `data` to the Report ID of the report to be read.
  393. * Make sure to allow space for this extra byte in `data`. Upon return, the
  394. * first byte will still contain the Report ID, and the report data will start
  395. * in data[1].
  396. *
  397. * \param dev A device handle returned from SDL_hid_open().
  398. * \param data A buffer to put the read data into, including the Report ID.
  399. * Set the first byte of `data` to the Report ID of the report to
  400. * be read, or set it to zero if your device does not use numbered
  401. * reports.
  402. * \param length The number of bytes to read, including an extra byte for the
  403. * report ID. The buffer can be longer than the actual report.
  404. * \returns the number of bytes read plus one for the report ID (which is
  405. * still in the first byte), or -1 on error.
  406. *
  407. * \since This function is available since SDL 3.0.0.
  408. */
  409. extern DECLSPEC int SDLCALL SDL_hid_get_input_report(SDL_hid_device *dev, unsigned char *data, size_t length);
  410. /**
  411. * Close a HID device.
  412. *
  413. * \param dev A device handle returned from SDL_hid_open().
  414. * \returns 0 on success or a negative error code on failure; call
  415. * SDL_GetError() for more information.
  416. *
  417. * \since This function is available since SDL 3.0.0.
  418. */
  419. extern DECLSPEC int SDLCALL SDL_hid_close(SDL_hid_device *dev);
  420. /**
  421. * Get The Manufacturer String from a HID device.
  422. *
  423. * \param dev A device handle returned from SDL_hid_open().
  424. * \param string A wide string buffer to put the data into.
  425. * \param maxlen The length of the buffer in multiples of wchar_t.
  426. * \returns 0 on success or a negative error code on failure; call
  427. * SDL_GetError() for more information.
  428. *
  429. * \since This function is available since SDL 3.0.0.
  430. */
  431. extern DECLSPEC int SDLCALL SDL_hid_get_manufacturer_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
  432. /**
  433. * Get The Product String from a HID device.
  434. *
  435. * \param dev A device handle returned from SDL_hid_open().
  436. * \param string A wide string buffer to put the data into.
  437. * \param maxlen The length of the buffer in multiples of wchar_t.
  438. * \returns 0 on success or a negative error code on failure; call
  439. * SDL_GetError() for more information.
  440. *
  441. * \since This function is available since SDL 3.0.0.
  442. */
  443. extern DECLSPEC int SDLCALL SDL_hid_get_product_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
  444. /**
  445. * Get The Serial Number String from a HID device.
  446. *
  447. * \param dev A device handle returned from SDL_hid_open().
  448. * \param string A wide string buffer to put the data into.
  449. * \param maxlen The length of the buffer in multiples of wchar_t.
  450. * \returns 0 on success or a negative error code on failure; call
  451. * SDL_GetError() for more information.
  452. *
  453. * \since This function is available since SDL 3.0.0.
  454. */
  455. extern DECLSPEC int SDLCALL SDL_hid_get_serial_number_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
  456. /**
  457. * Get a string from a HID device, based on its string index.
  458. *
  459. * \param dev A device handle returned from SDL_hid_open().
  460. * \param string_index The index of the string to get.
  461. * \param string A wide string buffer to put the data into.
  462. * \param maxlen The length of the buffer in multiples of wchar_t.
  463. * \returns 0 on success or a negative error code on failure; call
  464. * SDL_GetError() for more information.
  465. *
  466. * \since This function is available since SDL 3.0.0.
  467. */
  468. extern DECLSPEC int SDLCALL SDL_hid_get_indexed_string(SDL_hid_device *dev, int string_index, wchar_t *string, size_t maxlen);
  469. /**
  470. * Get the device info from a HID device.
  471. *
  472. * \param dev A device handle returned from SDL_hid_open().
  473. * \returns a pointer to the SDL_hid_device_info for this hid_device, or NULL
  474. * in the case of failure; call SDL_GetError() for more information.
  475. * This struct is valid until the device is closed with
  476. * SDL_hid_close().
  477. *
  478. * \since This function is available since SDL 3.0.0.
  479. */
  480. extern DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_get_device_info(SDL_hid_device *dev);
  481. /**
  482. * Get a report descriptor from a HID device.
  483. *
  484. * User has to provide a preallocated buffer where descriptor will be copied
  485. * to. The recommended size for a preallocated buffer is 4096 bytes.
  486. *
  487. * \param dev A device handle returned from SDL_hid_open().
  488. * \param buf The buffer to copy descriptor into.
  489. * \param buf_size The size of the buffer in bytes.
  490. * \returns the number of bytes actually copied, or -1 on error; call
  491. * SDL_GetError() for more information.
  492. *
  493. * \since This function is available since SDL 3.0.0.
  494. */
  495. extern DECLSPEC int SDLCALL SDL_hid_get_report_descriptor(SDL_hid_device *dev, unsigned char *buf, size_t buf_size);
  496. /**
  497. * Start or stop a BLE scan on iOS and tvOS to pair Steam Controllers.
  498. *
  499. * \param active SDL_TRUE to start the scan, SDL_FALSE to stop the scan
  500. *
  501. * \since This function is available since SDL 3.0.0.
  502. */
  503. extern DECLSPEC void SDLCALL SDL_hid_ble_scan(SDL_bool active);
  504. /* Ends C function definitions when using C++ */
  505. #ifdef __cplusplus
  506. }
  507. #endif
  508. #include <SDL3/SDL_close_code.h>
  509. #endif /* SDL_hidapi_h_ */