libftdi-git Archives

Subject: A library to talk to FTDI chips branch, master, updated. v0.17-340-g33e27ed

From: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Sat, 28 Jul 2012 18:15:56 +0200 (CEST)
The branch, master has been updated
       via  33e27edfe5bc48502215d2fc4a39916df97717c6 (commit)
       via  3918b866d692b5592ac6f6c9903dab5d03c184f1 (commit)
       via  c1cf60a76010148ecba05f5a55ee19d5b71891c7 (commit)
       via  7aec58fb6798b5cde3971da38cbf956351093f48 (commit)
       via  bcf4a08bf629f8c6364b9057ab68228709ccab29 (commit)
       via  a182572280dafe54b975a688332ddd2649cf61b0 (commit)
       via  f78723aeef0364cb580dd3aba3c9954b034c45fb (commit)
       via  d5696b2ccaeec9fffcb2660e44817e31378f860a (commit)
       via  e0f78011c2691ee776cb0eddaf7def01f5783898 (commit)
       via  0444972e625e310df08074cbd75599540d0d644d (commit)
       via  364d74637acc273e360e707bfd51a3fffe60317e (commit)
       via  6dc7bd39373f952469114290cab4234467ff0615 (commit)
       via  42ece7602ea66377ef2727ab45286c5cb7e9ed52 (commit)
       via  1199c9b5a7e8ef67efb7c57098ece155190b6ce3 (commit)
       via  4945da5033db920b83a94d0ee5a44bfde99e198f (commit)
       via  d954c1e48e4aabb9bd7e7d6060626aea32ca93db (commit)
       via  9ff7af62a61f7b12b64aafd1be38d8ca00b6adca (commit)
       via  7a07197c9730977af3789b28a89f0b4033543fb7 (commit)
      from  b0a504597b70c3702742a816e6bf1fcc7cfc6d53 (commit)


- Log -----------------------------------------------------------------
commit 33e27edfe5bc48502215d2fc4a39916df97717c6
Merge: b0a504597b70c3702742a816e6bf1fcc7cfc6d53 
3918b866d692b5592ac6f6c9903dab5d03c184f1
Author: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
Date:   Sat Jul 28 18:15:12 2012 +0200

    Merge branch 'renames-for-release'

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                  |    4 +-
 CMakeLists.txt              |   25 ++++++------
 LICENSE                     |    4 +-
 TODO                        |    7 ---
 bindings/CMakeLists.txt     |    8 ++--
 bindings/ftdi.i             |   88 -------------------------------------------
 bindings/ftdi1.i            |   85 +++++++++++++++++++++++++++++++++++++++++
 examples/CMakeLists.txt     |   22 +++++-----
 examples/python/complete.py |    2 +-
 examples/python/simple.py   |    2 +-
 ftdi_eeprom/CMakeLists.txt  |    2 +-
 ftdipp/CMakeLists.txt       |   30 +++++++-------
 libftdi-config.in           |   79 --------------------------------------
 libftdi.pc.in               |   13 ------
 libftdi.spec.in             |   67 --------------------------------
 libftdi1-config.in          |   79 ++++++++++++++++++++++++++++++++++++++
 libftdi1.pc.in              |   13 ++++++
 libftdi1.spec.in            |   67 ++++++++++++++++++++++++++++++++
 libftdipp.pc.in             |   11 -----
 libftdipp1.pc.in            |   11 +++++
 packages/CMakeLists.txt     |    6 +-
 src/CMakeLists.txt          |   22 +++++-----
 test/CMakeLists.txt         |    8 ++--
 23 files changed, 323 insertions(+), 332 deletions(-)
 delete mode 100644 bindings/ftdi.i
 create mode 100644 bindings/ftdi1.i
 delete mode 100644 libftdi-config.in
 delete mode 100644 libftdi.pc.in
 delete mode 100644 libftdi.spec.in
 create mode 100644 libftdi1-config.in
 create mode 100644 libftdi1.pc.in
 create mode 100644 libftdi1.spec.in
 delete mode 100644 libftdipp.pc.in
 create mode 100644 libftdipp1.pc.in

diff --git a/.gitignore b/.gitignore
index dcf277d..2559aa2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,8 +38,8 @@ examples/simple
 .*.swp
 
 # libftdi specific
-libftdi-config
-libftdi.spec
+libftdi1-config
+libftdi1.spec
 
 # CMake
 CMakeCache.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 07f8bb9..14911ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,8 +1,8 @@
 # Project
-project(libftdi)
+project(libftdi1)
 set(MAJOR_VERSION 1)
 set(MINOR_VERSION 0)
-set(PACKAGE libftdi)
+set(PACKAGE libftdi1)
 set(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION})
 set(VERSION ${VERSION_STRING})
 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}")
@@ -37,7 +37,7 @@ set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ Headers")
 set(CPACK_COMPONENT_SHAREDLIBS_DESCRIPTION
 "Shared library for general use.")
 set(CPACK_COMPONENT_STATICLIBS_DESCRIPTION
-"Static library, good if you want to embed libftdi in your application.")
+"Static library, good if you want to embed libftdi1 in your application.")
 set(CPACK_COMPONENT_HEADERS_DESCRIPTION
 "C/C++ header files.")
 
@@ -65,7 +65,7 @@ endif(NOT APPLE)
 # Package information
 set(CPACK_PACKAGE_VERSION              ${VERSION_STRING})
 set(CPACK_PACKAGE_CONTACT              "Intra2net AG 
<libftdi@xxxxxxxxxxxxxxxxxxxxxxx>")
-set(CPACK_PACKAGE_DESCRIPTION          "libftdi library.")
+set(CPACK_PACKAGE_DESCRIPTION          "libftdi1 library.")
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY  ${CPACK_PACKAGE_DESCRIPTION}
                                        )
 # Package settings
@@ -81,9 +81,9 @@ if(${WIN32})
   set(CPACK_CMAKE_GENERATOR              "MinGW Makefiles")
   set(CPACK_PACKAGE_NAME                 "${PROJECT_NAME}")
   set(CPACK_PACKAGE_VENDOR               "")
-  set(CPACK_PACKAGE_INSTALL_DIRECTORY    "libftdi")
+  set(CPACK_PACKAGE_INSTALL_DIRECTORY    "libftdi1")
   set(CPACK_PACKAGE_FILE_NAME            
"${PROJECT_NAME}-${VERSION_STRING}-win32")
-  set(CPACK_NSIS_DISPLAY_NAME            "libftdi")
+  set(CPACK_NSIS_DISPLAY_NAME            "libftdi1")
   set(CPACK_NSIS_MODIFY_PATH             "ON")
 endif(${WIN32})
 
@@ -138,7 +138,7 @@ if(DOCUMENTATION AND DOXYGEN_FOUND)
    OUTPUT ${CMAKE_BINARY_DIR}/doc
    COMMAND rm -rf ${CMAKE_BINARY_DIR}/doc/{html,man}
    COMMAND mkdir -p ${CMAKE_BINARY_DIR}/doc
-   DEPENDS ftdi ftdipp
+   DEPENDS ftdi1 ftdipp1
    )
 
    # Run doxygen
@@ -168,14 +168,15 @@ if(${WIN32})
    set(libdir      ${CMAKE_INSTALL_PREFIX}/bin)
 endif(${WIN32})
 
-configure_file(${CMAKE_SOURCE_DIR}/libftdi.pc.in 
${CMAKE_BINARY_DIR}/libftdi.pc @ONLY)
-configure_file(${CMAKE_SOURCE_DIR}/libftdipp.pc.in 
${CMAKE_BINARY_DIR}/libftdipp.pc @ONLY)
-install(FILES ${CMAKE_BINARY_DIR}/libftdi.pc ${CMAKE_BINARY_DIR}/libftdipp.pc
+configure_file(${CMAKE_SOURCE_DIR}/libftdi1.spec.in 
${CMAKE_BINARY_DIR}/libftdi1.spec @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/libftdi1.pc.in 
${CMAKE_BINARY_DIR}/libftdi1.pc @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/libftdipp1.pc.in 
${CMAKE_BINARY_DIR}/libftdipp1.pc @ONLY)
+install(FILES ${CMAKE_BINARY_DIR}/libftdi1.pc ${CMAKE_BINARY_DIR}/libftdipp1.pc
         DESTINATION lib${LIB_SUFFIX}/pkgconfig)
 
 if(${UNIX})
-    configure_file(${CMAKE_SOURCE_DIR}/libftdi-config.in 
${CMAKE_BINARY_DIR}/libftdi-config @ONLY)
-    install(PROGRAMS ${CMAKE_BINARY_DIR}/libftdi-config DESTINATION bin)
+    configure_file(${CMAKE_SOURCE_DIR}/libftdi1-config.in 
${CMAKE_BINARY_DIR}/libftdi1-config @ONLY)
+    install(PROGRAMS ${CMAKE_BINARY_DIR}/libftdi1-config DESTINATION bin)
 endif(${UNIX})
 
 include(CPack)
diff --git a/LICENSE b/LICENSE
index dd66312..f1831c0 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-The C library "libftdi" is distributed under the
+The C library "libftdi1" is distributed under the
 GNU Library General Public License version 2.
 
 A copy of the GNU Library General Public License (LGPL) is included
@@ -6,7 +6,7 @@ in this distribution, in the file COPYING.LIB.
 
 ----------------------------------------------------------------------
 
-The C++ wrapper "ftdipp" is distributed under the GNU General
+The C++ wrapper "ftdipp1" is distributed under the GNU General
 Public License version 2 (with a special exception described below).
 
 A copy of the GNU General Public License (GPL) is included
diff --git a/TODO b/TODO
index 0b419b5..1363a34 100644
--- a/TODO
+++ b/TODO
@@ -1,11 +1,4 @@
 *** TODO for 1.0 release ***
-Build related:
-- Rename the library and header file,
-  so libftdi 0.x and 1.x can co-exist
-
-API extentions:
-- TO DECIDE: Make ftdi structure opaque?
-
 Misc:
 - Resolve TODO entries in ftdi_eeprom
 - Look into merging ftdi_eeprom and examples/eeprom
diff --git a/bindings/CMakeLists.txt b/bindings/CMakeLists.txt
index b17d8a8..28061a6 100644
--- a/bindings/CMakeLists.txt
+++ b/bindings/CMakeLists.txt
@@ -10,8 +10,8 @@ if(PYTHON_BINDINGS AND SWIG_FOUND AND PYTHONLIBS_FOUND AND 
PYTHONINTERP_FOUND)
     INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
     LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../src)
 
-    SWIG_ADD_MODULE(ftdi python ftdi.i)
-    SWIG_LINK_LIBRARIES(ftdi ftdi ${PYTHON_LIBRARIES})
+    SWIG_ADD_MODULE(ftdi1 python ftdi1.i)
+    SWIG_LINK_LIBRARIES(ftdi1 ftdi1 ${PYTHON_LIBRARIES})
 
     execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c "import sys; print 
'%d.%d' % ( sys.version_info[0], sys.version_info[1] )"
                       OUTPUT_VARIABLE PYTHON_VERSION
@@ -19,8 +19,8 @@ if(PYTHON_BINDINGS AND SWIG_FOUND AND PYTHONLIBS_FOUND AND 
PYTHONINTERP_FOUND)
 
     set ( SITEPACKAGE lib${LIB_SUFFIX}/python${PYTHON_VERSION}/site-packages )
 
-    INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/_ftdi.so DESTINATION 
${SITEPACKAGE})
-    INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ftdi.py DESTINATION 
${SITEPACKAGE})
+    INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/_ftdi1.so DESTINATION 
${SITEPACKAGE})
+    INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ftdi1.py DESTINATION 
${SITEPACKAGE})
 
     message(STATUS "Building python bindings via swig. Will be installed under 
${CMAKE_INSTALL_PREFIX}/${SITEPACKAGE}")
 else(PYTHON_BINDINGS AND SWIG_FOUND AND PYTHONLIBS_FOUND AND 
PYTHONINTERP_FOUND)
diff --git a/bindings/ftdi.i b/bindings/ftdi.i
deleted file mode 100644
index 42c2646..0000000
--- a/bindings/ftdi.i
+++ /dev/null
@@ -1,88 +0,0 @@
-/* File: ftdi.i */
-
-%module(docstring="Python interface to libftdi") ftdi
-
-%include <typemaps.i>
-%include <cstring.i>
-
-%typemap(in) unsigned char* = char*;
-
-%ignore ftdi_write_data_async;
-%ignore ftdi_async_complete;
-
-%immutable ftdi_version_info::version_str;
-%immutable ftdi_version_info::snapshot_str;
-
-%rename("%(strip:[ftdi_])s") "";
-
-%newobject ftdi_new;
-%typemap(newfree) struct ftdi_context *ftdi "ftdi_free($1);";
-%delobject ftdi_free;
-
-%typemap(in,numinputs=0) SWIGTYPE** OUTPUT ($*ltype temp) %{ $1 = &temp; %}
-%typemap(argout) SWIGTYPE** OUTPUT %{ $result = 
SWIG_Python_AppendOutput($result, 
SWIG_NewPointerObj((void*)*$1,$*descriptor,0)); %}
-%apply SWIGTYPE** OUTPUT { struct ftdi_device_list **devlist };
-    int ftdi_usb_find_all(struct ftdi_context *ftdi, struct ftdi_device_list 
**devlist,
-                          int vendor, int product);
-%clear struct ftdi_device_list **devlist;
-
-%apply char *OUTPUT { char * manufacturer, char * description, char * serial };
-%cstring_bounded_output( char * manufacturer, 256 );
-%cstring_bounded_output( char * description, 256 );
-%cstring_bounded_output( char * serial, 256 );
-%typemap(default,noblock=1) int mnf_len, int desc_len, int serial_len { $1 = 
256; }
-    int ftdi_usb_get_strings(struct ftdi_context *ftdi, struct libusb_device 
*dev,
-                             char * manufacturer, int mnf_len,
-                             char * description, int desc_len,
-                             char * serial, int serial_len);
-%clear char * manufacturer, char * description, char * serial;
-%clear int mnf_len, int desc_len, int serial_len;
-
-%typemap(in,numinputs=1) (unsigned char *buf, int size) %{ $2 = 
PyInt_AsLong($input);$1 = (unsigned char*)malloc($2*sizeof(char)); %}
-%typemap(argout) (unsigned char *buf, int size) %{ if(result<0) $2=0; $result 
= SWIG_Python_AppendOutput($result, PyString_FromStringAndSize((char*)$1, $2)); 
free($1); %}
-    int ftdi_read_data(struct ftdi_context *ftdi, unsigned char *buf, int 
size);
-%clear (unsigned char *buf, int size);
-
-%apply int *OUTPUT { unsigned int *chunksize };
-    int ftdi_read_data_get_chunksize(struct ftdi_context *ftdi, unsigned int 
*chunksize);
-    int ftdi_write_data_get_chunksize(struct ftdi_context *ftdi, unsigned int 
*chunksize);
-%clear unsigned int *chunksize;
-
-%apply char *OUTPUT { unsigned char *pins };
-    int ftdi_read_pins(struct ftdi_context *ftdi, unsigned char *pins);
-%clear unsigned char *pins;
-
-%apply char *OUTPUT { unsigned char *latency };
-    int ftdi_get_latency_timer(struct ftdi_context *ftdi, unsigned char 
*latency);
-%clear unsigned char *latency;
-
-%apply short *OUTPUT { unsigned short *status };
-    int ftdi_poll_modem_status(struct ftdi_context *ftdi, unsigned short 
*status);
-%clear unsigned short *status;
-
-%apply int *OUTPUT { int* value };
-    int ftdi_get_eeprom_value(struct ftdi_context *ftdi, enum 
ftdi_eeprom_value value_name, int* value);
-%clear int* value;
-
-%typemap(in,numinputs=1) (unsigned char *buf, int size) %{ $2 = 
PyInt_AsLong($input);$1 = (unsigned char*)malloc($2*sizeof(char)); %}
-%typemap(argout) (unsigned char *buf, int size) %{ if(result<0) $2=0; $result 
= SWIG_Python_AppendOutput($result, PyString_FromStringAndSize((char*)$1, $2)); 
free($1); %}
-    int ftdi_get_eeprom_buf(struct ftdi_context *ftdi, unsigned char * buf, 
int size);
-%clear (unsigned char *buf, int size);
-
-%apply short *OUTPUT { unsigned short *eeprom_val };
-    int ftdi_read_eeprom_location (struct ftdi_context *ftdi, int eeprom_addr, 
unsigned short *eeprom_val);
-%clear unsigned short *eeprom_val;
-
-%apply int *OUTPUT { unsigned int *chipid };
-    int ftdi_read_chipid(struct ftdi_context *ftdi, unsigned int *chipid);
-%clear unsigned int *chipid;
-
-%include ftdi.h
-%{
-#include <ftdi.h>
-%}
-
-%include ftdi_i.h
-%{
-#include <ftdi_i.h>
-%}
diff --git a/bindings/ftdi1.i b/bindings/ftdi1.i
new file mode 100644
index 0000000..f26a334
--- /dev/null
+++ b/bindings/ftdi1.i
@@ -0,0 +1,85 @@
+/* File: ftdi1.i */
+
+%module(docstring="Python interface to libftdi1") ftdi1
+
+%include <typemaps.i>
+%include <cstring.i>
+
+%typemap(in) unsigned char* = char*;
+
+%immutable ftdi_version_info::version_str;
+%immutable ftdi_version_info::snapshot_str;
+
+%rename("%(strip:[ftdi_])s") "";
+
+%newobject ftdi_new;
+%typemap(newfree) struct ftdi_context *ftdi "ftdi_free($1);";
+%delobject ftdi_free;
+
+%typemap(in,numinputs=0) SWIGTYPE** OUTPUT ($*ltype temp) %{ $1 = &temp; %}
+%typemap(argout) SWIGTYPE** OUTPUT %{ $result = 
SWIG_Python_AppendOutput($result, 
SWIG_NewPointerObj((void*)*$1,$*descriptor,0)); %}
+%apply SWIGTYPE** OUTPUT { struct ftdi_device_list **devlist };
+    int ftdi_usb_find_all(struct ftdi_context *ftdi, struct ftdi_device_list 
**devlist,
+                          int vendor, int product);
+%clear struct ftdi_device_list **devlist;
+
+%apply char *OUTPUT { char * manufacturer, char * description, char * serial };
+%cstring_bounded_output( char * manufacturer, 256 );
+%cstring_bounded_output( char * description, 256 );
+%cstring_bounded_output( char * serial, 256 );
+%typemap(default,noblock=1) int mnf_len, int desc_len, int serial_len { $1 = 
256; }
+    int ftdi_usb_get_strings(struct ftdi_context *ftdi, struct libusb_device 
*dev,
+                             char * manufacturer, int mnf_len,
+                             char * description, int desc_len,
+                             char * serial, int serial_len);
+%clear char * manufacturer, char * description, char * serial;
+%clear int mnf_len, int desc_len, int serial_len;
+
+%typemap(in,numinputs=1) (unsigned char *buf, int size) %{ $2 = 
PyInt_AsLong($input);$1 = (unsigned char*)malloc($2*sizeof(char)); %}
+%typemap(argout) (unsigned char *buf, int size) %{ if(result<0) $2=0; $result 
= SWIG_Python_AppendOutput($result, PyString_FromStringAndSize((char*)$1, $2)); 
free($1); %}
+    int ftdi_read_data(struct ftdi_context *ftdi, unsigned char *buf, int 
size);
+%clear (unsigned char *buf, int size);
+
+%apply int *OUTPUT { unsigned int *chunksize };
+    int ftdi_read_data_get_chunksize(struct ftdi_context *ftdi, unsigned int 
*chunksize);
+    int ftdi_write_data_get_chunksize(struct ftdi_context *ftdi, unsigned int 
*chunksize);
+%clear unsigned int *chunksize;
+
+%apply char *OUTPUT { unsigned char *pins };
+    int ftdi_read_pins(struct ftdi_context *ftdi, unsigned char *pins);
+%clear unsigned char *pins;
+
+%apply char *OUTPUT { unsigned char *latency };
+    int ftdi_get_latency_timer(struct ftdi_context *ftdi, unsigned char 
*latency);
+%clear unsigned char *latency;
+
+%apply short *OUTPUT { unsigned short *status };
+    int ftdi_poll_modem_status(struct ftdi_context *ftdi, unsigned short 
*status);
+%clear unsigned short *status;
+
+%apply int *OUTPUT { int* value };
+    int ftdi_get_eeprom_value(struct ftdi_context *ftdi, enum 
ftdi_eeprom_value value_name, int* value);
+%clear int* value;
+
+%typemap(in,numinputs=1) (unsigned char *buf, int size) %{ $2 = 
PyInt_AsLong($input);$1 = (unsigned char*)malloc($2*sizeof(char)); %}
+%typemap(argout) (unsigned char *buf, int size) %{ if(result<0) $2=0; $result 
= SWIG_Python_AppendOutput($result, PyString_FromStringAndSize((char*)$1, $2)); 
free($1); %}
+    int ftdi_get_eeprom_buf(struct ftdi_context *ftdi, unsigned char * buf, 
int size);
+%clear (unsigned char *buf, int size);
+
+%apply short *OUTPUT { unsigned short *eeprom_val };
+    int ftdi_read_eeprom_location (struct ftdi_context *ftdi, int eeprom_addr, 
unsigned short *eeprom_val);
+%clear unsigned short *eeprom_val;
+
+%apply int *OUTPUT { unsigned int *chipid };
+    int ftdi_read_chipid(struct ftdi_context *ftdi, unsigned int *chipid);
+%clear unsigned int *chipid;
+
+%include ftdi.h
+%{
+#include <ftdi.h>
+%}
+
+%include ftdi_i.h
+%{
+#include <ftdi_i.h>
+%}
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 11e5aab..6793d89 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -21,16 +21,16 @@ if (EXAMPLES)
     add_executable(eeprom eeprom.c)
 
     # Linkage
-    target_link_libraries(simple ftdi)
-    target_link_libraries(bitbang ftdi)
-    target_link_libraries(bitbang2 ftdi)
-    target_link_libraries(bitbang_cbus ftdi)
-    target_link_libraries(bitbang_ft2232 ftdi)
-    target_link_libraries(find_all ftdi)
-    target_link_libraries(serial_test ftdi)
-    target_link_libraries(baud_test ftdi)
-    target_link_libraries(stream_test ftdi)
-    target_link_libraries(eeprom ftdi)
+    target_link_libraries(simple ftdi1)
+    target_link_libraries(bitbang ftdi1)
+    target_link_libraries(bitbang2 ftdi1)
+    target_link_libraries(bitbang_cbus ftdi1)
+    target_link_libraries(bitbang_ft2232 ftdi1)
+    target_link_libraries(find_all ftdi1)
+    target_link_libraries(serial_test ftdi1)
+    target_link_libraries(baud_test ftdi1)
+    target_link_libraries(stream_test ftdi1)
+    target_link_libraries(eeprom ftdi1)
 
     # libftdi++ examples
     if(FTDI_BUILD_CPP)
@@ -43,7 +43,7 @@ if (EXAMPLES)
             add_executable(find_all_pp find_all_pp.cpp)
 
             # Linkage
-            target_link_libraries(find_all_pp ftdipp)
+            target_link_libraries(find_all_pp ftdipp1)
         endif(Boost_FOUND)
     endif(FTDI_BUILD_CPP)
 
diff --git a/examples/python/complete.py b/examples/python/complete.py
index cee917d..f1b737c 100644
--- a/examples/python/complete.py
+++ b/examples/python/complete.py
@@ -9,7 +9,7 @@ of the swig generated python wrapper
 You need to build and install the wrapper first"""
 
 import os
-import ftdi
+import ftdi1 as ftdi
 import time
 
 # initialize
diff --git a/examples/python/simple.py b/examples/python/simple.py
index ecd5c2f..82ef6bb 100644
--- a/examples/python/simple.py
+++ b/examples/python/simple.py
@@ -8,7 +8,7 @@ of the swig generated python wrapper
 
 You need to build and install the wrapper first"""
 
-import ftdi
+import ftdi1 as ftdi
 
 def main():
     """Main program"""
diff --git a/ftdi_eeprom/CMakeLists.txt b/ftdi_eeprom/CMakeLists.txt
index 38d7a96..f2552ee 100644
--- a/ftdi_eeprom/CMakeLists.txt
+++ b/ftdi_eeprom/CMakeLists.txt
@@ -27,7 +27,7 @@ if (FTDI_EEPROM)
         )
 
         add_executable(ftdi_eeprom main.c)
-        target_link_libraries(ftdi_eeprom ftdi)
+        target_link_libraries(ftdi_eeprom ftdi1)
         target_link_libraries(ftdi_eeprom ${Confuse_LIBRARIES})
 
     else(Confuse_FOUND)
diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt
index 23000c9..48e5a76 100644
--- a/ftdipp/CMakeLists.txt
+++ b/ftdipp/CMakeLists.txt
@@ -1,7 +1,7 @@
 # Check
 set(FTDI_BUILD_CPP False PARENT_SCOPE)
 
-option(FTDIPP "Build C++ binding library libftdi++" ON)
+option(FTDIPP "Build C++ binding library libftdi1++" ON)
 
 if (FTDIPP)
 
@@ -19,32 +19,32 @@ if (FTDIPP)
         set(cpp_headers   ftdi.hpp)
 
         set(FTDI_BUILD_CPP True PARENT_SCOPE)
-        message(STATUS "Building libftdi++")
+        message(STATUS "Building libftdi1++")
 
         # Shared library
-        add_library(ftdipp SHARED ${cpp_sources})
+        add_library(ftdipp1 SHARED ${cpp_sources})
 
         math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1")    # Compatiblity with 
previous releases
-        set_target_properties(ftdipp PROPERTIES VERSION 
${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2)
+        set_target_properties(ftdipp1 PROPERTIES VERSION 
${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2)
 
         # Static library
-        add_library(ftdipp-static STATIC ${cpp_sources})
-        set_target_properties(ftdipp-static PROPERTIES OUTPUT_NAME "ftdipp")
+        add_library(ftdipp1-static STATIC ${cpp_sources})
+        set_target_properties(ftdipp1-static PROPERTIES OUTPUT_NAME "ftdipp1")
 
         # Prevent clobbering each other during the build
-        set_target_properties(ftdipp PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-        set_target_properties(ftdipp-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+        set_target_properties(ftdipp1 PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+        set_target_properties(ftdipp1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
 
         # Dependencies
-        target_link_libraries(ftdipp ftdi ${LIBUSB_LIBRARIES} 
${BOOST_LIBRARIES})
+        target_link_libraries(ftdipp1 ftdi1 ${LIBUSB_LIBRARIES} 
${BOOST_LIBRARIES})
 
         # Install
         if(${UNIX})
-            install( TARGETS ftdipp
+            install( TARGETS ftdipp1
                         LIBRARY DESTINATION lib${LIB_SUFFIX}
                         COMPONENT sharedlibs
                         )
-            install( TARGETS ftdipp-static
+            install( TARGETS ftdipp1-static
                         ARCHIVE DESTINATION lib${LIB_SUFFIX}
                         COMPONENT staticlibs
                         )
@@ -55,11 +55,11 @@ if (FTDIPP)
         endif(${UNIX})
 
         if(${WIN32})
-            install( TARGETS ftdipp
+            install( TARGETS ftdipp1
                         DESTINATION bin
                         COMPONENT sharedlibs
                         )
-            install( TARGETS ftdipp-static
+            install( TARGETS ftdipp1-static
                         DESTINATION bin
                         COMPONENT staticlibs
                         )
@@ -70,11 +70,11 @@ if (FTDIPP)
         endif(${WIN32})
 
     else(Boost_FOUND)
-        message(STATUS "Boost not found, won't build libftdi++")
+        message(STATUS "Boost not found, won't build libftdi1++")
     endif(Boost_FOUND)
 
 else(FTDIPP)
 
-    message(STATUS "Not building libftdi++")
+    message(STATUS "Not building libftdi1++")
 
 endif(FTDIPP)
diff --git a/libftdi-config.in b/libftdi-config.in
deleted file mode 100644
index a71de4e..0000000
--- a/libftdi-config.in
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-exec_prefix_set=no
-
-usage()
-{
-       cat <<EOF
-Usage: libftdi-config [OPTIONS] [LIBRARIES]
-Options:
-       [--prefix[=DIR]]
-       [--exec-prefix[=DIR]]
-       [--version]
-       [--libs]
-       [--cflags]
-EOF
-       exit $1
-}
-
-if test $# -eq 0; then
-       usage 1 1>&2
-fi
-
-while test $# -gt 0; do
-  case "$1" in
-  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) optarg= ;;
-  esac
-
-  case $1 in
-    --prefix=*)
-      prefix=$optarg
-      if test $exec_prefix_set = no ; then
-        exec_prefix=$optarg
-      fi
-      ;;
-    --prefix)
-      echo_prefix=yes
-      ;;
-    --exec-prefix=*)
-      exec_prefix=$optarg
-      exec_prefix_set=yes
-      ;;
-    --exec-prefix)
-      echo_exec_prefix=yes
-      ;;
-    --version)
-      echo @VERSION@
-      exit 0
-      ;;
-    --cflags)
-      if test "@includedir@" != /usr/include ; then
-        includes="-I@includedir@"
-      fi
-      echo_cflags=yes
-      ;;
-    --libs)
-      echo_libs=yes
-      ;;
-    *)
-      usage 1 1>&2
-      ;;
-  esac
-  shift
-done
-
-if test "$echo_prefix" = "yes"; then
-       echo $prefix
-fi
-if test "$echo_exec_prefix" = "yes"; then
-       echo $exec_prefix
-fi
-if test "$echo_cflags" = "yes"; then
-       echo $includes
-fi
-if test "$echo_libs" = "yes"; then
-       echo -L@libdir@ -lftdi @LIBS@
-fi
diff --git a/libftdi.pc.in b/libftdi.pc.in
deleted file mode 100644
index f8aaaeb..0000000
--- a/libftdi.pc.in
+++ /dev/null
@@ -1,13 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-libusb_libs=@LIBUSB_1_0_LIBS@
-libusb_cflags=@LIBUSB_1_0_CFLAGS@
-
-Name: libftdi
-Description: Library to program and control the FTDI USB controller
-Requires: libusb-1.0
-Version: @VERSION@
-Libs: -L${libdir} -lftdi ${libusb_libs}
-Cflags: -I${includedir} ${libusb_cflags}
diff --git a/libftdi.spec.in b/libftdi.spec.in
deleted file mode 100644
index ec4d063..0000000
--- a/libftdi.spec.in
+++ /dev/null
@@ -1,67 +0,0 @@
-Summary:   Library to program and control the FTDI USB controller
-Name:      libftdi
-Version:   @VERSION@
-Release:   1
-License:   LGPL for libftdi and GPLv2+linking exception for the C++ wrapper
-Group:     System Environment/Libraries
-Vendor:    Intra2net AG
-Source:    
http://www.intra2net.com/en/developer/libftdi/download/%{name}-%{version}.tar.gz
-Buildroot: /tmp/%{name}-%{version}-root
-Requires:  libusb
-BuildRequires: libusb, libusb-devel, pkgconfig, doxygen
-Prefix:    /usr
-URL:       http://www.intra2net.com/en/developer/libftdi
-
-%package   devel
-Summary:   Header files and static libraries for libftdi
-Group:     Development/Libraries
-Requires:  libftdi = %{version}, libusb-devel
-
-%description 
-Library to program and control the FTDI USB controller
-
-%description devel
-Header files and static libraries for libftdi
-
-%prep
-%setup -q
-
-%build
-
-PARAMS=""
-./configure --prefix=%{prefix} \
-    --libdir=%{_libdir}
-%endif
-
-make
-
-%install
-make DESTDIR=$RPM_BUILD_ROOT install
-
-# Remove example programs
-rm -f $RPM_BUILD_ROOT/usr/bin/simple
-rm -f $RPM_BUILD_ROOT/usr/bin/bitbang
-rm -f $RPM_BUILD_ROOT/usr/bin/bitbang2
-rm -f $RPM_BUILD_ROOT/usr/bin/bitbang_ft2232
-rm -f $RPM_BUILD_ROOT/usr/bin/bitbang_cbus
-rm -f $RPM_BUILD_ROOT/usr/bin/find_all
-rm -f $RPM_BUILD_ROOT/usr/bin/find_all_pp
-rm -f $RPM_BUILD_ROOT/usr/bin/serial_test
-rm -f $RPM_BUILD_ROOT/usr/bin/baud_test
-
-%clean
-rm -fr $RPM_BUILD_ROOT
-
-%files
-%defattr(-,root,root)
-%doc COPYING.LIB COPYING.GPL LICENSE
-%{_libdir}/libftdi*.so*
-
-%files devel
-%defattr(-,root,root)
-%doc doc/html doc/man
-%{_bindir}/libftdi-config
-%{prefix}/include/*.h
-%{prefix}/include/*.hpp
-%{_libdir}/libftdi*.*a
-%{_libdir}/pkgconfig/*.pc
diff --git a/libftdi1-config.in b/libftdi1-config.in
new file mode 100644
index 0000000..a3e2058
--- /dev/null
+++ b/libftdi1-config.in
@@ -0,0 +1,79 @@
+#!/bin/sh
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec_prefix_set=no
+
+usage()
+{
+       cat <<EOF
+Usage: libftdi1-config [OPTIONS] [LIBRARIES]
+Options:
+       [--prefix[=DIR]]
+       [--exec-prefix[=DIR]]
+       [--version]
+       [--libs]
+       [--cflags]
+EOF
+       exit $1
+}
+
+if test $# -eq 0; then
+       usage 1 1>&2
+fi
+
+while test $# -gt 0; do
+  case "$1" in
+  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  case $1 in
+    --prefix=*)
+      prefix=$optarg
+      if test $exec_prefix_set = no ; then
+        exec_prefix=$optarg
+      fi
+      ;;
+    --prefix)
+      echo_prefix=yes
+      ;;
+    --exec-prefix=*)
+      exec_prefix=$optarg
+      exec_prefix_set=yes
+      ;;
+    --exec-prefix)
+      echo_exec_prefix=yes
+      ;;
+    --version)
+      echo @VERSION@
+      exit 0
+      ;;
+    --cflags)
+      if test "@includedir@" != /usr/include ; then
+        includes="-I@includedir@"
+      fi
+      echo_cflags=yes
+      ;;
+    --libs)
+      echo_libs=yes
+      ;;
+    *)
+      usage 1 1>&2
+      ;;
+  esac
+  shift
+done
+
+if test "$echo_prefix" = "yes"; then
+       echo $prefix
+fi
+if test "$echo_exec_prefix" = "yes"; then
+       echo $exec_prefix
+fi
+if test "$echo_cflags" = "yes"; then
+       echo $includes
+fi
+if test "$echo_libs" = "yes"; then
+       echo -L@libdir@ -lftdi1 @LIBS@
+fi
diff --git a/libftdi1.pc.in b/libftdi1.pc.in
new file mode 100644
index 0000000..300f38c
--- /dev/null
+++ b/libftdi1.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+libusb_libs=@LIBUSB_1_0_LIBS@
+libusb_cflags=@LIBUSB_1_0_CFLAGS@
+
+Name: libftdi1
+Description: Library to program and control the FTDI USB controller
+Requires: libusb-1.0
+Version: @VERSION@
+Libs: -L${libdir} -lftdi1 ${libusb_libs}
+Cflags: -I${includedir} ${libusb_cflags}
diff --git a/libftdi1.spec.in b/libftdi1.spec.in
new file mode 100644
index 0000000..8c06b09
--- /dev/null
+++ b/libftdi1.spec.in
@@ -0,0 +1,67 @@
+Summary:   Library to program and control the FTDI USB controller
+Name:      libftdi1
+Version:   @VERSION@
+Release:   1
+License:   LGPL for libftdi and GPLv2+linking exception for the C++ wrapper
+Group:     System Environment/Libraries
+Vendor:    Intra2net AG
+Source:    
http://www.intra2net.com/en/developer/libftdi/download/%{name}-%{version}.tar.gz
+Buildroot: /tmp/%{name}-%{version}-root
+Requires:  libusb1
+BuildRequires: libusb1, libusb1-devel, pkgconfig, doxygen
+Prefix:    /usr
+URL:       http://www.intra2net.com/en/developer/libftdi
+
+%package   devel
+Summary:   Header files and static libraries for libftdi1
+Group:     Development/Libraries
+Requires:  libftdi1 = %{version}, libusb1-devel
+
+%description 
+Library to program and control the FTDI USB controller
+
+%description devel
+Header files and static libraries for libftdi1
+
+%prep
+%setup -q
+
+%build
+
+PARAMS=""
+./configure --prefix=%{prefix} \
+    --libdir=%{_libdir}
+%endif
+
+make
+
+%install
+make DESTDIR=$RPM_BUILD_ROOT install
+
+# Remove example programs
+rm -f $RPM_BUILD_ROOT/usr/bin/simple
+rm -f $RPM_BUILD_ROOT/usr/bin/bitbang
+rm -f $RPM_BUILD_ROOT/usr/bin/bitbang2
+rm -f $RPM_BUILD_ROOT/usr/bin/bitbang_ft2232
+rm -f $RPM_BUILD_ROOT/usr/bin/bitbang_cbus
+rm -f $RPM_BUILD_ROOT/usr/bin/find_all
+rm -f $RPM_BUILD_ROOT/usr/bin/find_all_pp
+rm -f $RPM_BUILD_ROOT/usr/bin/serial_test
+rm -f $RPM_BUILD_ROOT/usr/bin/baud_test
+
+%clean
+rm -fr $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%doc COPYING.LIB COPYING.GPL LICENSE
+%{_libdir}/libftdi1*.so*
+
+%files devel
+%defattr(-,root,root)
+%doc doc/html doc/man
+%{_bindir}/libftdi1-config
+%{prefix}/include/libftdi1/*.h
+%{prefix}/include/libftdi1/*.hpp
+%{_libdir}/libftdi1*.*a
+%{_libdir}/pkgconfig/*.pc
diff --git a/libftdipp.pc.in b/libftdipp.pc.in
deleted file mode 100644
index ee81fef..0000000
--- a/libftdipp.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: libftdipp
-Description: C++ wrapper for libftdi
-Requires: libftdi
-Version: @VERSION@
-Libs: -L${libdir} -lftdipp
-Cflags: -I${includedir}
diff --git a/libftdipp1.pc.in b/libftdipp1.pc.in
new file mode 100644
index 0000000..8158f38
--- /dev/null
+++ b/libftdipp1.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libftdipp1
+Description: C++ wrapper for libftdi1
+Requires: libftdi1
+Version: @VERSION@
+Libs: -L${libdir} -lftdipp1
+Cflags: -I${includedir}
diff --git a/packages/CMakeLists.txt b/packages/CMakeLists.txt
index 00b2696..4bf58d2 100644
--- a/packages/CMakeLists.txt
+++ b/packages/CMakeLists.txt
@@ -7,8 +7,8 @@ if("${PACKAGE}" STREQUAL "Debian")
    set(CPACK_PACKAGE_VERSION              ${CPACK_PACKAGE_VERSION}-${REVISION} 
PARENT_SCOPE)
 
    # Dependencies
-   set(CPACK_DEBIAN_PACKAGE_DEPENDS       "libusb-0.1-4" PARENT_SCOPE)
-   set(DEBIAN_PACKAGE_BUILDS_DEPENDS      "cmake, libusb-dev" PARENT_SCOPE)
+   set(CPACK_DEBIAN_PACKAGE_DEPENDS       "libusb-1.0-0" PARENT_SCOPE)
+   set(DEBIAN_PACKAGE_BUILDS_DEPENDS      "cmake, libusb2-dev" PARENT_SCOPE)
 
    # Bundles
    message("-- Installing udev rules to /etc/udev/rules.d")
@@ -18,4 +18,4 @@ if("${PACKAGE}" STREQUAL "Debian")
 endif("${PACKAGE}" STREQUAL "Debian")
 
 # General RPM rules
-set(CPACK_RPM_PACKAGE_DEPENDS       "libusb" PARENT_SCOPE)
+set(CPACK_RPM_PACKAGE_DEPENDS       "libusb1" PARENT_SCOPE)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7ce9eda..0b8c009 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -21,31 +21,31 @@ configure_file(ftdi_version_i.h.in 
"${CMAKE_CURRENT_BINARY_DIR}/ftdi_version_i.h
 set(c_sources     ftdi.c ftdi_stream.c)
 set(c_headers     ftdi.h)
 
-add_library(ftdi SHARED ${c_sources})
+add_library(ftdi1 SHARED ${c_sources})
 
 math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1")    # Compatiblity with 
previous releases
-set_target_properties(ftdi PROPERTIES VERSION 
${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2)
+set_target_properties(ftdi1 PROPERTIES VERSION 
${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2)
 
 # Static library
-add_library(ftdi-static STATIC ${c_sources})
-set_target_properties(ftdi-static PROPERTIES OUTPUT_NAME "ftdi")
+add_library(ftdi1-static STATIC ${c_sources})
+set_target_properties(ftdi1-static PROPERTIES OUTPUT_NAME "ftdi1")
 
 # Prevent clobbering each other during the build
-set_target_properties(ftdi PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-set_target_properties(ftdi-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+set_target_properties(ftdi1 PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+set_target_properties(ftdi1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
 
 # Dependencies
-target_link_libraries(ftdi ${LIBUSB_LIBRARIES})
+target_link_libraries(ftdi1 ${LIBUSB_LIBRARIES})
 
 # Install
 if(${UNIX})
 
-   install( TARGETS ftdi
+   install( TARGETS ftdi1
             LIBRARY DESTINATION lib${LIB_SUFFIX}
             COMPONENT sharedlibs
             )
 
-   install( TARGETS ftdi-static
+   install( TARGETS ftdi1-static
             ARCHIVE DESTINATION lib${LIB_SUFFIX}
             COMPONENT staticlibs
             )
@@ -59,12 +59,12 @@ endif(${UNIX})
 
 if(${WIN32})
 
-   install( TARGETS ftdi
+   install( TARGETS ftdi1
             DESTINATION bin
             COMPONENT sharedlibs
             )
 
-   install( TARGETS ftdi-static
+   install( TARGETS ftdi1-static
             DESTINATION bin
             COMPONENT staticlibs
             )
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 8737f66..53e3f7b 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -15,13 +15,13 @@ if(Boost_UNIT_TEST_FRAMEWORK_FOUND)
         baudrate.cpp
     )
 
-    add_executable(test_libftdi ${cpp_tests})
-    target_link_libraries(test_libftdi ftdi 
${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
+    add_executable(test_libftdi1 ${cpp_tests})
+    target_link_libraries(test_libftdi1 ftdi1 
${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
 
-    add_test(test_libftdi test_libftdi)
+    add_test(test_libftdi1 test_libftdi1)
 
     # Add custom target so we run easily run "make check"
-    add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS 
test_libftdi)
+    add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS 
test_libftdi1)
 
 else(Boost_UNIT_TEST_FRAMEWORK_FOUND)
 


hooks/post-receive
-- 
A library to talk to FTDI chips

--
libftdi-git - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi-git+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread
  • A library to talk to FTDI chips branch, master, updated. v0.17-340-g33e27ed, libftdi-git <=