Give usage hints for handling empty EEPROM
authorUwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Wed, 20 Jul 2011 09:12:44 +0000 (11:12 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 27 Jul 2011 16:11:42 +0000 (18:11 +0200)
examples/eeprom.c

index ef789a3..247589a 100644 (file)
@@ -30,7 +30,8 @@ int read_decode_eeprom(struct ftdi_context *ftdi)
     ftdi_get_eeprom_value(ftdi, CHIP_SIZE, & value);
     if (value <0)
     {
-        fprintf(stderr, "No EEPROM found\n");
+        fprintf(stderr, "No EEPROM found or EEPROM empty\n");
+        fprintf(stderr, "On empty EEPROM, use -w option to write default values\n");
         return -1;
     }
     fprintf(stderr, "Chip type %d ftdi_eeprom_size: %d\n", ftdi->type, value);