OpenOCD
ublast_access.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 /*
4  * Driver for USB-JTAG, Altera USB-Blaster and compatibles
5  *
6  * Inspired from original code from Kolja Waschk's USB-JTAG project
7  * (http://www.ixo.de/info/usb_jtag/), and from openocd project.
8  *
9  * Copyright (C) 2013 Franck Jullien franck.jullien@gmail.com
10  * Copyright (C) 2012 Robert Jarzmik robert.jarzmik@free.fr
11  * Copyright (C) 2011 Ali Lown ali@lown.me.uk
12  * Copyright (C) 2009 Catalin Patulea cat@vv.carleton.ca
13  * Copyright (C) 2006 Kolja Waschk usbjtag@ixo.de
14  *
15  */
16 
17 #ifndef OPENOCD_JTAG_DRIVERS_USB_BLASTER_UBLAST_ACCESS_H
18 #define OPENOCD_JTAG_DRIVERS_USB_BLASTER_UBLAST_ACCESS_H
19 
20 /* Low level flags */
21 #define COPY_TDO_BUFFER (1 << 0)
22 
24  uint16_t ublast_vid;
25  uint16_t ublast_pid;
28  struct libusb_device_handle *libusb_dev;
30 
31  int (*write)(struct ublast_lowlevel *low, uint8_t *buf, int size,
32  uint32_t *bytes_written);
33  int (*read)(struct ublast_lowlevel *low, uint8_t *buf, unsigned size,
34  uint32_t *bytes_read);
35  int (*open)(struct ublast_lowlevel *low);
36  int (*close)(struct ublast_lowlevel *low);
37  int (*speed)(struct ublast_lowlevel *low, int speed);
38 
39  void *priv;
40  int flags;
41 };
42 
54 extern struct ublast_lowlevel *ublast_register_ftdi(void);
55 extern struct ublast_lowlevel *ublast2_register_libusb(void);
56 
57 #endif /* OPENOCD_JTAG_DRIVERS_USB_BLASTER_UBLAST_ACCESS_H */
size_t size
Size of the control block search area.
Definition: rtt/rtt.c:30
uint16_t ublast_pid_uninit
Definition: ublast_access.h:27
int(* open)(struct ublast_lowlevel *low)
Definition: ublast_access.h:35
int(* write)(struct ublast_lowlevel *low, uint8_t *buf, int size, uint32_t *bytes_written)
Definition: ublast_access.h:31
int(* speed)(struct ublast_lowlevel *low, int speed)
Definition: ublast_access.h:37
struct libusb_device_handle * libusb_dev
Definition: ublast_access.h:28
uint16_t ublast_vid
Definition: ublast_access.h:24
uint16_t ublast_vid_uninit
Definition: ublast_access.h:26
uint16_t ublast_pid
Definition: ublast_access.h:25
int(* read)(struct ublast_lowlevel *low, uint8_t *buf, unsigned size, uint32_t *bytes_read)
Definition: ublast_access.h:33
int(* close)(struct ublast_lowlevel *low)
Definition: ublast_access.h:36
char * firmware_path
Definition: ublast_access.h:29
static struct ublast_lowlevel low
struct ublast_lowlevel * ublast_register_ftdi(void)
ublast_register_ftdi - get a lowlevel USB Blaster driver ublast2_register_libusb - get a lowlevel USB...
struct ublast_lowlevel * ublast2_register_libusb(void)