aboutsummaryrefslogtreecommitdiff
path: root/busdevice.c
diff options
context:
space:
mode:
authorTero Kontkanen <tero.kontkanen@granitedevices.fi>2017-08-19 17:05:51 +0300
committerTero Kontkanen <tero.kontkanen@granitedevices.fi>2017-08-19 17:34:34 +0300
commit6ef9e8c44e29d270c64c22b73ae00508966b4892 (patch)
treeda4561d6e961d0403689dc175ab288d8e127f134 /busdevice.c
parentd78fb3d4aac4ed7c28311a69ae86ffb88d03b972 (diff)
downloadSimpleMotionV2-6ef9e8c44e29d270c64c22b73ae00508966b4892.tar.gz
SimpleMotionV2-6ef9e8c44e29d270c64c22b73ae00508966b4892.zip
Add functions to list compatible bus device (ftdi d2xx only)
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;
+
+}