Added new read/write_eeprom_location to C++ wrapper
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 5 Nov 2009 08:46:19 +0000 (09:46 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 5 Nov 2009 08:46:19 +0000 (09:46 +0100)
ftdipp/ftdi.cpp
ftdipp/ftdi.hpp

index 8f9e2b9..7c2dd78 100644 (file)
@@ -396,6 +396,16 @@ int Eeprom::write(unsigned char *eeprom)
     return ftdi_write_eeprom(d->context, eeprom);
 }
 
+int Eeprom::read_location(int eeprom_addr, unsigned short *eeprom_val)
+{
+    return ftdi_read_eeprom_location(d->context, eeprom_addr, eeprom_val);
+}
+
+int Eeprom::write_location(int eeprom_addr, unsigned short eeprom_val)
+{
+    return ftdi_write_eeprom_location(d->context, eeprom_addr, eeprom_val);
+}
+
 int Eeprom::erase()
 {
     return ftdi_erase_eeprom(d->context);
index d752bd6..b074785 100644 (file)
@@ -153,8 +153,11 @@ public:
     int size(unsigned char *eeprom, int maxsize);
     int chip_id(unsigned int *chipid);
     int build(unsigned char *output);
+
     int read(unsigned char *eeprom);
     int write(unsigned char *eeprom);
+    int read_location(int eeprom_addr, unsigned short *eeprom_val);
+    int write_location(int eeprom_addr, unsigned short eeprom_val);
     int erase();
 
 private: