Checks if a bus type is supported by the device.
#include <peripheral_discovery.h>
int pd_is_bus_supported(pd_bus_t bus_id, bool *is_supported)
BlackBerry 10.2.0
The bus to be checked.
true if the bus is supported, false if it is not.
You can use function to determine if devices will appear on the specified bus. For example, if the peripheral to support is a USB peripheral that will be connected when the device is in host mode, this function should be called to check if USB host mode is actually supported.
bool is_supported;
if( pd_is_bus_supported( PD_BUS_USB_HOST_MODE, &is_supported ) == EOK ) {
if( !is_supported ) {
printf( "Bus not supported\n" );
}
} else {
printf( "Error determining if bus is supported\n" );
}
EOK on success.