BALTECH SDK wrapper functions reference

§ brp_ioiter_create_usb_hid()

BRP_LIB brp_ioiter brp_ioiter_create_usb_hid ( void  )

Creates an iterator for enumerating USB HID devices.

Enumerates USB HID devices with default Baltech VID (0x13AD) and PID ranges (40000-40999, 1000-1999, 0xF001-0xFFFF). Only devices with valid numeric serial numbers and BRP interface (usage_page=0xFF00, usage=1) are included.

The iterator must be destroyed with brp_ioiter_destroy() when done.

Returns
Iterator handle or NULL on failure (e.g., out of memory)
if (iter == NULL) {
// Handle error
return;
}
brp_protocol protocol;
while (brp_ioiter_next(iter, &protocol) == BRP_OK && protocol != NULL) {
// Use protocol
char* name = brp_get_friendly_name(protocol);
printf("Found USB HID device: %s\n", name ? name : "Unknown");
// Clean up protocol when done
brp_destroy(protocol);
}