Revision 0854c460 usrp/host/include/usrp/usrp_prims.h
| b/usrp/host/include/usrp/usrp_prims.h | ||
|---|---|---|
| 43 | 43 |
|
| 44 | 44 |
struct libusb_device_handle; |
| 45 | 45 |
struct libusb_device; |
| 46 |
struct libusb_context; |
|
| 46 | 47 |
|
| 47 | 48 |
/*! |
| 48 | 49 |
* \brief initialize libusb; probe busses and devices. |
| 49 |
* Safe to call more than once. |
|
| 50 |
* If new_context is set to true, initiate and returns new libusb_context. |
|
| 51 |
* If new_context is set to false, intiate default context if not already |
|
| 52 |
* initiated and return NULL. It is NOT safe to call more than once with |
|
| 53 |
* new_context set to true since a new context is initiated each time. |
|
| 50 | 54 |
*/ |
| 51 |
void usrp_one_time_init ();
|
|
| 55 |
libusb_context* usrp_one_time_init (bool new_context);
|
|
| 52 | 56 |
|
| 53 | 57 |
/* |
| 54 | 58 |
* force a rescan of the buses and devices |
| ... | ... | |
| 65 | 69 |
* configured USRP (firmware loaded) |
| 66 | 70 |
* unconfigured Cypress FX2 (only if fx2_ok_p is true) |
| 67 | 71 |
*/ |
| 68 |
struct libusb_device *usrp_find_device (int nth, bool fx2_ok_p = false); |
|
| 72 |
struct libusb_device *usrp_find_device (int nth, bool fx2_ok_p = false, libusb_context *ctx = NULL);
|
|
| 69 | 73 |
|
| 70 | 74 |
bool usrp_usrp_p (struct libusb_device *q); //< is this a USRP |
| 71 | 75 |
bool usrp_usrp0_p (struct libusb_device *q); //< is this a USRP Rev 0 |
| ... | ... | |
| 119 | 123 |
* then rescans the busses and devices. |
| 120 | 124 |
*/ |
| 121 | 125 |
usrp_load_status_t |
| 122 |
usrp_load_firmware_nth (int nth, const char *filename, bool force); |
|
| 126 |
usrp_load_firmware_nth (int nth, const char *filename, bool force, libusb_context *ctx);
|
|
| 123 | 127 |
|
| 124 | 128 |
/*! |
| 125 | 129 |
* \brief load fpga configuration bitstream |
| ... | ... | |
| 134 | 138 |
*/ |
| 135 | 139 |
bool usrp_load_standard_bits (int nth, bool force, |
| 136 | 140 |
const std::string fpga_filename = "", |
| 137 |
const std::string firmware_filename = ""); |
|
| 141 |
const std::string firmware_filename = "", |
|
| 142 |
libusb_context *ctx = NULL); |
|
| 138 | 143 |
|
| 139 | 144 |
/*! |
| 140 | 145 |
* \brief copy the given \p hash into the USRP hash slot \p which. |
Also available in: Unified diff