From 449c87a96e59286cb1e3e49f40ec77b39e4eede1 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Thu, 5 Nov 2009 09:46:19 +0100 Subject: [PATCH] Added new read/write_eeprom_location to C++ wrapper --- ftdipp/ftdi.cpp | 10 ++++++++++ ftdipp/ftdi.hpp | 3 +++ 2 files changed, 13 insertions(+), 0 deletions(-) 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: -- 1.7.1