From 943a61fcc94d7668c4abf5133806398e8d75148b Mon Sep 17 00:00:00 2001 From: ttsou Date: Wed, 16 Sep 2009 16:39:35 -0400 Subject: Comments for usrp_prims --- usrp/host/lib/usrp_prims.h.in | 46 ++++++++++++++----------------------------- 1 file changed, 15 insertions(+), 31 deletions(-) diff --git a/usrp/host/lib/usrp_prims.h.in b/usrp/host/lib/usrp_prims.h.in index 8198d1797..dde480b27 100644 --- a/usrp/host/lib/usrp_prims.h.in +++ b/usrp/host/lib/usrp_prims.h.in @@ -5,11 +5,21 @@ static const int USRP_HASH_SIZE = 16; enum usrp_load_status_t { ULS_ERROR = 0, ULS_OK, ULS_ALREADY_LOADED }; /*! - * \brief initialize libusb; probe busses and devices. - * If new_context is set to true, initiate and returns new libusb_context. - * If new_context is set to false, intiate default context if not already - * initiated and return NULL. It is NOT safe to call more than once with - * new_context set to true since a new context is initiated each time. + * \brief initialize libusb; Behavior differs depending on libusb version + * + * libusb-0.12 + * + * Probe busses and devices. The argument is ignored and defaults to NULL. + * Safe to call more than once. + * + * libusb-1.0 + * + * If an location to a libusb_context is passed in, create and write in the new + * context. If no argument is provided, initialize libusb with the default + * (NULL) context. + * + * Generally _not_ safe to call more than once with non-NULL argument since a + * new context will be created each time. */ void usrp_one_time_init (libusb_context **ctx = NULL); @@ -256,30 +266,4 @@ bool usrp_write_dboard_offsets (libusb_device_handle *udh, int slot_id, */ std::string usrp_serial_number(libusb_device_handle *udh); -/* - * Internal functions - */ - -libusb_device_handle * -usrp_open_interface(libusb_device *dev, int interface, int altinterface); - -int write_cmd (libusb_device_handle *udh, int request, int value, int index, - unsigned char *bytes, int len); - -/* - * Compatibility functions - */ - -libusb_device *_get_usb_device (libusb_device_handle *udh); - -libusb_device_descriptor _get_usb_device_descriptor (libusb_device *q); - -int _get_usb_string_descriptor (libusb_device_handle *udh, int index, - unsigned char* data, int length); - -int _usb_control_transfer (libusb_device_handle *udh, int request_type, - int request, int value, int index, - unsigned char *data, int length, - unsigned int timeout); - #endif /* _USRP_PRIMS_H_ */ -- cgit