summaryrefslogtreecommitdiff
path: root/utils/hwstub/lib/hwstub.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/hwstub/lib/hwstub.h')
-rw-r--r--utils/hwstub/lib/hwstub.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/hwstub/lib/hwstub.h b/utils/hwstub/lib/hwstub.h
index 69fdc63988..1599f6508b 100644
--- a/utils/hwstub/lib/hwstub.h
+++ b/utils/hwstub/lib/hwstub.h
@@ -36,6 +36,12 @@ extern "C" {
36 36
37struct hwstub_device_t; 37struct hwstub_device_t;
38 38
39/* Returns hwstub interface, or -1 if none was found */
40int hwstub_probe(libusb_device *dev);
41/* Helper function which returns a list of all hwstub devices found. The caller
42 * must unref all of them when done, possibly using libusb_free_device_list().
43 * Return number of devices or <0 on error */
44ssize_t hwstub_get_device_list(libusb_context *ctx, libusb_device ***list);
39/* Returns NULL on error */ 45/* Returns NULL on error */
40struct hwstub_device_t *hwstub_open(libusb_device_handle *handle); 46struct hwstub_device_t *hwstub_open(libusb_device_handle *handle);
41/* Returns 0 on success. Does *NOT* close the usb handle */ 47/* Returns 0 on success. Does *NOT* close the usb handle */
@@ -46,6 +52,8 @@ int hwstub_get_desc(struct hwstub_device_t *dev, uint16_t desc, void *info, size
46/* Returns number of bytes filled */ 52/* Returns number of bytes filled */
47int hwstub_get_log(struct hwstub_device_t *dev, void *buf, size_t sz); 53int hwstub_get_log(struct hwstub_device_t *dev, void *buf, size_t sz);
48/* Returns number of bytes written/read or <0 on error */ 54/* Returns number of bytes written/read or <0 on error */
55int hwstub_read(struct hwstub_device_t *dev, uint32_t addr, void *buf, size_t sz);
56int hwstub_write(struct hwstub_device_t *dev, uint32_t addr, void *buf, size_t sz);
49int hwstub_rw_mem(struct hwstub_device_t *dev, int read, uint32_t addr, void *buf, size_t sz); 57int hwstub_rw_mem(struct hwstub_device_t *dev, int read, uint32_t addr, void *buf, size_t sz);
50/* Returns <0 on error */ 58/* Returns <0 on error */
51int hwstub_call(struct hwstub_device_t *dev, uint32_t addr); 59int hwstub_call(struct hwstub_device_t *dev, uint32_t addr);