diff options
Diffstat (limited to 'utils/hwstub/lib/hwstub.h')
-rw-r--r-- | utils/hwstub/lib/hwstub.h | 8 |
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 | ||
37 | struct hwstub_device_t; | 37 | struct hwstub_device_t; |
38 | 38 | ||
39 | /* Returns hwstub interface, or -1 if none was found */ | ||
40 | int 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 */ | ||
44 | ssize_t hwstub_get_device_list(libusb_context *ctx, libusb_device ***list); | ||
39 | /* Returns NULL on error */ | 45 | /* Returns NULL on error */ |
40 | struct hwstub_device_t *hwstub_open(libusb_device_handle *handle); | 46 | struct 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 */ |
47 | int hwstub_get_log(struct hwstub_device_t *dev, void *buf, size_t sz); | 53 | int 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 */ |
55 | int hwstub_read(struct hwstub_device_t *dev, uint32_t addr, void *buf, size_t sz); | ||
56 | int hwstub_write(struct hwstub_device_t *dev, uint32_t addr, void *buf, size_t sz); | ||
49 | int hwstub_rw_mem(struct hwstub_device_t *dev, int read, uint32_t addr, void *buf, size_t sz); | 57 | int 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 */ |
51 | int hwstub_call(struct hwstub_device_t *dev, uint32_t addr); | 59 | int hwstub_call(struct hwstub_device_t *dev, uint32_t addr); |