Merge branch 'eeprom-new'
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 20 May 2011 14:10:11 +0000 (16:10 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 20 May 2011 14:10:11 +0000 (16:10 +0200)
Conflicts:
examples/stream_test.c

1  2 
CMakeLists.txt
bindings/ftdi.i
ftdipp/ftdi.hpp

diff --combined CMakeLists.txt
@@@ -59,7 -59,7 +59,7 @@@ endif(NOT APPLE
  
  # Package information
  set(CPACK_PACKAGE_VERSION              ${VERSION_STRING})
 -set(CPACK_PACKAGE_CONTACT              "Marek Vavrusa <marek@vavrusa.com>")
 +set(CPACK_PACKAGE_CONTACT              "Intra2net AG <libftdi@developer.intra2net.com>")
  set(CPACK_PACKAGE_DESCRIPTION          "libftdi library.")
  set(CPACK_PACKAGE_DESCRIPTION_SUMMARY  ${CPACK_PACKAGE_DESCRIPTION}
                                         )
@@@ -96,6 -96,7 +96,7 @@@ endif(${UNIX}
  add_subdirectory(src)
  add_subdirectory(ftdipp)
  add_subdirectory(bindings)
+ add_subdirectory(ftdi_eeprom)
  add_subdirectory(examples)
  add_subdirectory(packages)
  
@@@ -124,8 -125,8 +125,8 @@@ if(DOCUMENTATION AND DOXYGEN_FOUND
     # Create doc directory
     add_custom_command(
     OUTPUT ${CMAKE_BINARY_DIR}/doc
 -   COMMAND rm -rf ${CMAKE_BINARY_DIR}/doc
 -   COMMAND mkdir ${CMAKE_BINARY_DIR}/doc
 +   COMMAND rm -rf ${CMAKE_BINARY_DIR}/doc/{html,man}
 +   COMMAND mkdir -p ${CMAKE_BINARY_DIR}/doc
     DEPENDS ftdi ftdipp
     )
  
diff --combined bindings/ftdi.i
@@@ -3,8 -3,6 +3,8 @@@
  %include "typemaps.i"
  %include "cpointer.i"
  %pointer_functions(unsigned int, uintp);
 +%pointer_functions(unsigned char *, ucharp);
 +%pointer_functions(char *, charp);
  
  %typemap(in) unsigned char* = char*;
  %ignore ftdi_write_data_async;
@@@ -41,12 -39,12 +41,12 @@@ extern "C" 
  %clear unsigned short *status;
  
  %apply char *OUTPUT { unsigned char *output };
-     int  ftdi_eeprom_build(struct ftdi_eeprom *eeprom, unsigned char *output);
+     int  ftdi_eeprom_build(struct ftdi_context *ftdi);
  %clear unsigned char *output;
  
  %apply char *OUTPUT { unsigned char *eeprom };
-     int ftdi_read_eeprom(struct ftdi_context *ftdi, unsigned char *eeprom);
-     int ftdi_write_eeprom(struct ftdi_context *ftdi, unsigned char *eeprom);
+     int ftdi_read_eeprom(struct ftdi_context *ftdi);
+     int ftdi_write_eeprom(struct ftdi_context *ftdi);
  %clear unsigned char *eeprom;
  
  %apply int *OUTPUT { unsigned int *chipid };
diff --combined ftdipp/ftdi.hpp
@@@ -32,7 -32,7 +32,7 @@@ on this file might be covered by the GN
  #include <list>
  #include <string>
  #include <boost/shared_ptr.hpp>
 -#include "ftdi.h"
 +#include <ftdi.h>
  
  namespace Ftdi
  {
@@@ -152,9 -152,7 +152,7 @@@ public
      Eeprom(Context* parent);
      ~Eeprom();
  
-     void init_defaults();
-     void set_size(int size);
-     int size(unsigned char *eeprom, int maxsize);
+     int init_defaults(char *manufacturer, char* product, char * serial);
      int chip_id(unsigned int *chipid);
      int build(unsigned char *output);