|
OpenOCD
|


Go to the source code of this file.
Macros | |
| #define | LIBUSB_TIMEOUT_MS (6000) |
Typedefs | |
| typedef char *(* | adapter_get_alternate_serial_fn) (struct libusb_device_handle *device, struct libusb_device_descriptor *dev_desc) |
Functions | |
| int | jtag_libusb_bulk_read (struct libusb_device_handle *dev, int ep, char *bytes, int size, int timeout, int *transferred) |
| int | jtag_libusb_bulk_write (struct libusb_device_handle *dev, int ep, char *bytes, int size, int timeout, int *transferred) |
| int | jtag_libusb_choose_interface (struct libusb_device_handle *devh, unsigned int *usb_read_ep, unsigned int *usb_write_ep, int bclass, int subclass, int protocol, int trans_type) |
| Find the first interface optionally matching class, subclass and protocol and claim it. More... | |
| void | jtag_libusb_close (struct libusb_device_handle *dev) |
| int | jtag_libusb_control_transfer (struct libusb_device_handle *dev, uint8_t request_type, uint8_t request, uint16_t value, uint16_t index, char *bytes, uint16_t size, unsigned int timeout) |
| int | jtag_libusb_get_pid (struct libusb_device *dev, uint16_t *pid) |
| int | jtag_libusb_handle_events_completed (int *completed) |
| int | jtag_libusb_open (const uint16_t vids[], const uint16_t pids[], struct libusb_device_handle **out, adapter_get_alternate_serial_fn adapter_get_alternate_serial) |
| int | jtag_libusb_set_configuration (struct libusb_device_handle *devh, int configuration) |
| #define LIBUSB_TIMEOUT_MS (6000) |
Definition at line 26 of file libusb_helper.h.
| typedef char*(* adapter_get_alternate_serial_fn) (struct libusb_device_handle *device, struct libusb_device_descriptor *dev_desc) |
Definition at line 30 of file libusb_helper.h.
| int jtag_libusb_bulk_read | ( | struct libusb_device_handle * | dev, |
| int | ep, | ||
| char * | bytes, | ||
| int | size, | ||
| int | timeout, | ||
| int * | transferred | ||
| ) |
Definition at line 249 of file libusb_helper.c.
References ERROR_OK, jtag_libusb_error(), LOG_ERROR, and size.
Referenced by armjtagew_usb_read(), dtc_run_download(), dtc_start_download(), esp_usb_jtag_recv_buf(), ft232r_send_recv(), kitprog_swd_run_queue(), opendous_usb_read(), openjtag_buf_read_cy7c65215(), osbdm_send_and_recv(), rlink_init(), rlink_reset(), stlink_usb_usb_read_trace(), stlink_usb_xfer_rw(), stlink_usb_xfer_v1_get_status(), ublast2_libusb_read(), usb_bulk_read_ex(), usbprog_jtag_message(), usbprog_jtag_read_tdo(), and usbprog_jtag_write_and_read().
| int jtag_libusb_bulk_write | ( | struct libusb_device_handle * | dev, |
| int | ep, | ||
| char * | bytes, | ||
| int | size, | ||
| int | timeout, | ||
| int * | transferred | ||
| ) |
Definition at line 232 of file libusb_helper.c.
References ERROR_OK, jtag_libusb_error(), LOG_ERROR, and size.
Referenced by armjtagew_usb_write(), dtc_run_download(), ep1_generic_commandl(), ep1_memory_write(), esp_usb_jtag_send_buf(), ft232r_send_recv(), kitprog_swd_run_queue(), opendous_usb_write(), openjtag_buf_write_cy7c65215(), osbdm_send_and_recv(), stlink_usb_xfer_rw(), ublast2_libusb_write(), usbprog_jtag_message(), usbprog_jtag_read_tdo(), usbprog_jtag_write_and_read(), usbprog_jtag_write_tdi(), and wrap_usb_bulk_write().
| int jtag_libusb_choose_interface | ( | struct libusb_device_handle * | devh, |
| unsigned int * | usb_read_ep, | ||
| unsigned int * | usb_write_ep, | ||
| int | bclass, | ||
| int | subclass, | ||
| int | protocol, | ||
| int | trans_type | ||
| ) |
Find the first interface optionally matching class, subclass and protocol and claim it.
| devh | libusb device handle. |
| usb_read_ep | A pointer to a variable where the IN endpoint number will be stored. |
| usb_write_ep | A pointer to a variable where the OUT endpoint number will be stored. |
| bclass | bInterfaceClass to match, or -1 to ignore this field. |
| subclass | bInterfaceSubClass to match, or -1 to ignore this field. |
| protocol | bInterfaceProtocol to match, or -1 to ignore this field. |
| trans_type | bmAttributes Bits 0..1 Transfer type to match, or -1 to ignore this field. |
Definition at line 294 of file libusb_helper.c.
References config, devh, ERROR_FAIL, ERROR_OK, and LOG_DEBUG.
Referenced by aice_usb_open(), esp_usb_jtag_init(), openjtag_init_cy7c65215(), and ulink_init().
| void jtag_libusb_close | ( | struct libusb_device_handle * | dev | ) |
Definition at line 209 of file libusb_helper.c.
References jtag_libusb_context.
Referenced by aice_usb_close(), esp_usb_jtag_init(), esp_usb_jtag_quit(), ft232r_quit(), icdi_usb_close(), kitprog_usb_close(), opendous_usb_close(), openjtag_init_cy7c65215(), openjtag_quit_cy7c65215(), osbdm_quit(), stlink_usb_usb_close(), stlink_usb_usb_open(), and ublast2_libusb_init().
| int jtag_libusb_control_transfer | ( | struct libusb_device_handle * | dev, |
| uint8_t | request_type, | ||
| uint8_t | request, | ||
| uint16_t | value, | ||
| uint16_t | index, | ||
| char * | bytes, | ||
| uint16_t | size, | ||
| unsigned int | timeout | ||
| ) |
Definition at line 217 of file libusb_helper.c.
References size.
Referenced by COMMAND_HANDLER(), esp_usb_jtag_init(), esp_usb_jtag_speed(), ft232r_init(), ft232r_quit(), ft232r_speed(), kitprog_acquire_psoc(), kitprog_get_status(), kitprog_reset_target(), kitprog_set_protocol(), kitprog_set_unknown(), kitprog_swd_seq(), kitprog_swd_sync(), load_usb_blaster_firmware(), opendous_usb_read(), opendous_usb_write(), openjtag_buf_read_cy7c65215(), openjtag_buf_write_cy7c65215(), openjtag_init_cy7c65215(), openjtag_quit_cy7c65215(), ublast2_libusb_init(), and ublast2_write_firmware_section().
| int jtag_libusb_get_pid | ( | struct libusb_device * | dev, |
| uint16_t * | pid | ||
| ) |
Definition at line 346 of file libusb_helper.c.
References ERROR_FAIL, and ERROR_OK.
Referenced by stlink_usb_usb_open().
| int jtag_libusb_handle_events_completed | ( | int * | completed | ) |
Definition at line 359 of file libusb_helper.c.
References jtag_libusb_context.
| int jtag_libusb_open | ( | const uint16_t | vids[], |
| const uint16_t | pids[], | ||
| struct libusb_device_handle ** | out, | ||
| adapter_get_alternate_serial_fn | adapter_get_alternate_serial | ||
| ) |
Definition at line 148 of file libusb_helper.c.
References adapter_get_required_serial(), adapter_usb_get_location(), devs, ERROR_FAIL, ERROR_OK, jtag_libusb_context, jtag_libusb_location_equal(), jtag_libusb_match_ids(), jtag_libusb_match_serial(), LOG_ERROR, LOG_INFO, NULL, and serial.
Referenced by aice_usb_open(), armjtagew_usb_open(), esp_usb_jtag_init(), ft232r_init(), kitprog_usb_open(), opendous_usb_open(), openjtag_init_cy7c65215(), osbdm_open(), rlink_init(), stlink_usb_usb_open(), ublast2_libusb_init(), and usbprog_jtag_open().
| int jtag_libusb_set_configuration | ( | struct libusb_device_handle * | devh, |
| int | configuration | ||
| ) |
Definition at line 266 of file libusb_helper.c.
References config, devh, and NULL.
Referenced by esp_usb_jtag_init(), opendous_usb_open(), and stlink_usb_usb_open().