Comments for usrp_prims
authorttsou <ttsou@vt.edu>
Wed, 16 Sep 2009 20:39:35 +0000 (16:39 -0400)
committerttsou <ttsou@vt.edu>
Wed, 16 Sep 2009 21:08:53 +0000 (17:08 -0400)
usrp/host/lib/usrp_prims.h.in

index 8198d17972f201e668589b8c07807ce05dd806a6..dde480b2746151829d775ddc88e81cc6261e76db 100644 (file)
@@ -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_ */