50 libusb_device_handle *
udev;
57 #define RX_ENDPOINT (0x86) 58 #define VRT_VENDOR_IN (0xC0) 59 #define VRT_VENDOR_OUT (0x40) 60 #define RX_INTERFACE (2) 61 #define RX_ALTINTERFACE (0) 62 #define VRQ_GET_STATUS (0x80) 63 #define GS_RX_OVERRUN (1) 64 #define VRQ_XFER (0x01)
70 #define GN3S_VID (0x16C0) 71 #define GN3S_PID (0x072F) 72 #define VID_OLD (0x1781) 73 #define PID_OLD (0x0B39) 74 #define PROG_SET_CMD (0xE600) 75 #define USB_BUFFER_SIZE (16384) 76 #define USB_BLOCK_SIZE (512)
77 #define USB_NBLOCKS (USB_BUFFER_SIZE / USB_BLOCK_SIZE)
78 #define USB_NTRANSFERS (16) 79 #define USB_TIMEOUT (1000) 103 struct libusb_device *fx2_device;
104 struct libusb_device_handle *fx2_handle;
108 unsigned int gn3s_vid, gn3s_pid;
121 struct libusb_device*
usb_fx2_find(
unsigned int vid,
unsigned int pid,
char info,
int ignore);
125 int read(
unsigned char *buff,
int bytes);
126 int write_cmd(
int request,
int value,
int index,
unsigned char *bytes,
int len);
129 bool usrp_xfer(
char VRQ_TYPE,
bool start);
133 void upload_ram(
unsigned char *buf,
int start,
int len);
int interface
Definition: gn3s.h:48
bool usb_fx2_start_transfers()
gn3s(int _which)
Constructor.
#define USB_NTRANSFERS
Definition: gn3s.h:78
bool usb_fx2_configure(struct libusb_device *fx2, fx2Config *fx2c)
bool _get_status(int which, bool *trouble)
bool usrp_xfer(char VRQ_TYPE, bool start)
bool usb_fx2_cancel_transfers()
void program_fx2(char *filename, char mem)
int altinterface
Definition: gn3s.h:49
void upload_ram(unsigned char *buf, int start, int len)
int read(unsigned char *buff, int bytes)
libusb_device_handle * udev
Definition: gn3s.h:50
char _binary_usrp_gn3s_firmware_ihx_start[]
struct libusb_device * usb_fx2_find(unsigned int vid, unsigned int pid, char info, int ignore)
int write_cmd(int request, int value, int index, unsigned char *bytes, int len)