51#define RX_ENDPOINT (0x86)
52#define VRT_VENDOR_IN (0xC0)
53#define VRT_VENDOR_OUT (0x40)
54#define RX_INTERFACE (2)
55#define RX_ALTINTERFACE (0)
56#define VRQ_XFER (0x01)
57#define VRQ_ENABLE (0x10)
58#define VRQ_WRITE_CMD (0x20)
59#define VRQ_GET_STATUS (0x80)
60#define GS_RX_OVERRUN (1)
66#define GN3S_VID (0x1781)
67#define GN3S_PID (0x0B3C)
68#define PROG_SET_CMD (0xE600)
69#define USB_BUFFER_SIZE (65536)
70#define USB_BLOCK_SIZE (512)
71#define USB_NBLOCKS (USB_BUFFER_SIZE / USB_BLOCK_SIZE)
72#define USB_NTRANSFERS (16)
73#define USB_TIMEOUT (1000)
91 struct libusb_device *fx2_device;
92 struct libusb_device_handle *fx2_handle;
96 libusb_context *ctx =
nullptr;
98 struct libusb_device* usb_fx2_find(
int vid,
int pid);
99 bool usb_fx2_configure();
101 bool usb_fx2_start_transfers();
102 bool usb_fx2_cancel_transfers();
103 bool send_rx_cmd(
char VRQ_TYPE,
int start);
104 bool get_rx_status(
int which,
bool *trouble);
105 void set_bias_bit(
int bias);
106 void set_ant_bit(
int ant);
107 void set_freq_bit(
int freq);
108 void set_bw_bit(
int bw,
int zeroif);
116 int read(
unsigned char *buff,
int bytes);
117 int write_cmd(
int request,
int value,
int index,
unsigned char *bytes,
int len);
gnmax(int _which, gnmax_settings settings)
Constructor.
int write_cmd(int request, int value, int index, unsigned char *bytes, int len)
bool set_bw(int bw, int zeroif)
int read(unsigned char *buff, int bytes)
#define USB_NTRANSFERS
Definition gnmax.h:72
Definition gnmax_defines.h:25