From: Thomas Jarosch Date: Thu, 5 Nov 2009 08:46:19 +0000 (+0100) Subject: Added new read/write_eeprom_location to C++ wrapper X-Git-Tag: v0.17~23 X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=commitdiff_plain;h=449c87a96e59286cb1e3e49f40ec77b39e4eede1 Added new read/write_eeprom_location to C++ wrapper --- diff --git a/ftdipp/ftdi.cpp b/ftdipp/ftdi.cpp index 8f9e2b9..7c2dd78 100644 --- a/ftdipp/ftdi.cpp +++ b/ftdipp/ftdi.cpp @@ -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); diff --git a/ftdipp/ftdi.hpp b/ftdipp/ftdi.hpp index d752bd6..b074785 100644 --- a/ftdipp/ftdi.hpp +++ b/ftdipp/ftdi.hpp @@ -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: