diff options
Diffstat (limited to 'commandline/library/micronucleus_lib.c')
| -rw-r--r-- | commandline/library/micronucleus_lib.c | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/commandline/library/micronucleus_lib.c b/commandline/library/micronucleus_lib.c index 2e63425..1c3c179 100644 --- a/commandline/library/micronucleus_lib.c +++ b/commandline/library/micronucleus_lib.c @@ -47,6 +47,14 @@ micronucleus* micronucleus_connect() {          nucleus = malloc(sizeof(micronucleus));          nucleus->version.major = (dev->descriptor.bcdUSB >> 8) & 0xFF;          nucleus->version.minor = dev->descriptor.bcdUSB & 0xFF; +         +        if (nucleus->version.major > MICRONUCLEUS_MAX_MAJOR_VERSION) { +	        fprintf(stderr, "Warning: device with unknown new version of Micronucleus detected.\n"); +	        fprintf(stderr, "This tool doesn't know how to upload to this new device. Updates may be available.\n"); +	        fprintf(stderr, "Device reports version as: %d.%d\n", nucleus->version.major, nucleus->version.minor); +	        return NULL; +        } +                  nucleus->device = usb_open(dev);          // get nucleus info | 
