aboutsummaryrefslogtreecommitdiff
path: root/busdevice.c
diff options
context:
space:
mode:
Diffstat (limited to 'busdevice.c')
-rw-r--r--busdevice.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/busdevice.c b/busdevice.c
index eff5ccc..85a5b0e 100644
--- a/busdevice.c
+++ b/busdevice.c
@@ -373,3 +373,25 @@ smbool smBDRead( const smbusdevicehandle handle, smuint8 *byte )
return smfalse;
}
+
+//BUS DEVICE INFO FETCH FUNCTIONS:
+
+//Return number of bus devices found. details of each device may be consequently fetched by smGetBusDeviceDetails()
+smint smBDGetNumberOfDetectedBuses()
+{
+ //only supports FTDI D2XX at the moment
+#ifdef FTDI_D2XX_SUPPORT
+ return d2xxGetNumberOfDetectedBuses();
+#endif
+ return 0;
+}
+
+smbool smBDGetBusDeviceDetails( smint index, SM_BUS_DEVICE_INFO *info )
+{
+ //only supports FTDI D2XX at the moment
+#ifdef FTDI_D2XX_SUPPORT
+ return d2xxGetBusDeviceDetails(index,info);
+#endif
+ return smfalse;
+
+}