diff options
Diffstat (limited to 'src/usb-device.h')
-rw-r--r-- | src/usb-device.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/usb-device.h b/src/usb-device.h index 20a073c..082bf73 100644 --- a/src/usb-device.h +++ b/src/usb-device.h @@ -20,8 +20,19 @@ #ifndef USB_DEVICE_H #define USB_DEVICE_H +#include <stdint.h> + +/* u_int*_t types are not defined without _GNU_SOURCE but usb.h needs them */ +#define u_int8_t uint8_t +#define u_int16_t uint16_t +#define u_int32_t uint32_t + #include <usb.h> +#define USB_READ_EP (USB_ENDPOINT_IN | 0x1) +#define USB_WRITE_EP (USB_ENDPOINT_OUT | 0x1) +#define USB_WRITE_DATA_EP (USB_ENDPOINT_OUT | 0x2) + #include "device.h" enum usb_flash_protocol { @@ -48,6 +59,7 @@ struct usb_device_info { int16_t hwrev; const struct usb_flash_device * flash_device; usb_dev_handle * udev; + int data; }; const char * usb_flash_protocol_to_string(enum usb_flash_protocol protocol); @@ -56,7 +68,7 @@ void usb_close_device(struct usb_device_info * dev); void usb_switch_to_nolo(struct usb_device_info * dev); void usb_switch_to_cold(struct usb_device_info * dev); -void usb_switch_to_mkii(struct usb_device_info * dev); +void usb_switch_to_update(struct usb_device_info * dev); void usb_switch_to_disk(struct usb_device_info * dev); #endif |