X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/00b6b0140fa76845edaa894e0feb3287e4977c73..9e8bf8c0cfba6613d10a90b0ce76bdbbc9a72c8b:/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c diff --git a/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c b/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c index 6063e1981..058ccc63d 100644 --- a/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c +++ b/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c @@ -657,6 +657,11 @@ int hard_reboot(void) #include #endif +#ifndef USB_GET_DEVICEINFO +# define USB_GET_DEVICEINFO 0 +# error The USB_GET_DEVICEINFO ioctl() value is not defined for your system. +#endif + int open_usb_device(int vid, int pid) { int r, fd; @@ -712,7 +717,7 @@ int teensy_write(void *buf, int len, double timeout) { int r; - // TODO: imeplement timeout... how?? + // TODO: implement timeout... how?? r = write(uhid_teensy_fd, buf, len); if (r == len) return 1; return 0; @@ -807,7 +812,7 @@ int read_intel_hex(const char *filename) /* parses a line of intel hex code, stores the data in bytes[] */ /* and the beginning address in addr, and returns a 1 if the */ -/* line was valid, or a 0 if an error occured. The variable */ +/* line was valid, or a 0 if an error occurred. The variable */ /* num gets the number of bytes that were stored into bytes[] */ @@ -970,13 +975,9 @@ void parse_options(int argc, char **argv) } else if (strncmp(arg, "-mmcu=", 6) == 0) { arg += 6; - uint8_t valid_prefix = 0; - if (strncmp(arg, "at90usb", 7) == 0) { - valid_prefix = 1; arg += 7; } else if (strncmp(arg, "atmega", 6) == 0) { - valid_prefix = 1; arg += 6; } else { die("Unknown MCU type\n");