EEPROM: make user_data_addr value readable
authorYegor Yefremov <yegorslists@googlemail.com>
Mon, 31 Jul 2023 10:23:41 +0000 (12:23 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Tue, 29 Aug 2023 13:58:21 +0000 (15:58 +0200)
Before this change, the user_data_addr could be only written
but not read.

src/ftdi.c

index 4b16468..6b78fa3 100644 (file)
@@ -4183,6 +4183,9 @@ int ftdi_get_eeprom_value(struct ftdi_context *ftdi, enum ftdi_eeprom_value valu
         case EXTERNAL_OSCILLATOR:
             *value = ftdi->eeprom->external_oscillator;
             break;
+        case USER_DATA_ADDR:
+            *value = ftdi->eeprom->user_data_addr;
+            break;
         default:
             ftdi_error_return(-1, "Request for unknown EEPROM value");
     }