BALTECH SDK wrapper functions reference

§ brp_ioiter_create()

BRP_LIB brp_ioiter brp_ioiter_create ( void  )

Creates an iterator for enumerating all available I/O devices.

This function creates a composite iterator that enumerates all supported I/O protocols (currently USB HID only). The iterator will enumerate all devices across all supported protocols.

For USB HID devices: Enumerates 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 device: %s\n", name ? name : "Unknown");
// Clean up protocol when done
brp_destroy(protocol);
}