#include <libusb.h>#include <stdio.h>#include "sigrok.h"#include "sigrok-internal.h"#include "gl_usb.h"
Go to the source code of this file.
Defines | |
| #define | CTRL_IN |
| #define | CTRL_OUT |
| #define | EP1_BULK_IN (LIBUSB_ENDPOINT_IN | 1) |
| #define | TIMEOUT 5000 /* Timeout in ms */ |
Enumerations | |
| enum | { REQ_READBULK = 0x82, REQ_WRITEADDR, REQ_READDATA, REQ_WRITEDATA } |
Functions | |
| SR_PRIV int | gl_read_bulk (libusb_device_handle *devh, void *buffer, unsigned int size) |
| SR_PRIV int | gl_reg_write (libusb_device_handle *devh, unsigned int reg, unsigned int val) |
| SR_PRIV int | gl_reg_read (libusb_device_handle *devh, unsigned int reg) |
| #define CTRL_IN |
| #define CTRL_OUT |
(LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_OUT | \
LIBUSB_RECIPIENT_INTERFACE)
Definition at line 40 of file gl_usb.c.
Referenced by gl_read_bulk().
| #define EP1_BULK_IN (LIBUSB_ENDPOINT_IN | 1) |
Definition at line 42 of file gl_usb.c.
Referenced by gl_read_bulk().
| #define TIMEOUT 5000 /* Timeout in ms */ |
Definition at line 44 of file gl_usb.c.
Referenced by gl_read_bulk().
| anonymous enum |
| SR_PRIV int gl_read_bulk | ( | libusb_device_handle * | devh, |
| void * | buffer, | ||
| unsigned int | size | ||
| ) |
Definition at line 92 of file gl_usb.c.
References CTRL_OUT, EP1_BULK_IN, REQ_READBULK, sr_err(), and TIMEOUT.
Referenced by analyzer_read_data().

| SR_PRIV int gl_reg_read | ( | libusb_device_handle * | devh, |
| unsigned int | reg | ||
| ) |
Definition at line 125 of file gl_usb.c.
Referenced by analyzer_get_now_address(), analyzer_get_stop_address(), analyzer_get_trigger_address(), analyzer_read_id(), analyzer_read_start(), and analyzer_wait().
| SR_PRIV int gl_reg_write | ( | libusb_device_handle * | devh, |
| unsigned int | reg, | ||
| unsigned int | val | ||
| ) |
Definition at line 113 of file gl_usb.c.
Referenced by analyzer_configure().
1.7.6.1