Skip to content
Snippets Groups Projects
Commit 7781c68b authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Updated to version 1.3.6 of the FTDI library.

Changed the #ifndef #define macro of the CAN library to avoid conflicts with system libraries.
parent 70090404
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ ELSE(FTDI_INCLUDE_DIR AND FTDI_LIBRARY)
IF(FTDI_INCLUDE_DIR AND FTDI_LIBRARY)
SET(BUILD_FTDI TRUE)
SET(INSTALL_FTDI TRUE)
SET(FTDI_VER 1.1.12)
SET(FTDI_VER 1.3.6)
MESSAGE(STATUS "Use local ftdi files")
ELSE(FTDI_INCLUDE_DIR AND FTDI_LIBRARY)
MESSAGE(STATUS "FTDI library won't be build. Impossible to locate the necessary files")
......
#ifndef _CAN_H
#define _CAN_H
#ifndef _IRI_CAN_H
#define _IRI_CAN_H
#include "comm.h"
#include "mutex.h"
......
......@@ -70,8 +70,3 @@ ADD_EXECUTABLE(test_udp_tx test_simple_client_udp_tx.cpp)
# edit the following line to add the necessary libraries
TARGET_LINK_LIBRARIES(test_udp_tx ${IRIUTILS_LIBRARY} comm pthread)
# edit the following line to add the source code for the example and the name of the executable
ADD_EXECUTABLE(test_candump test_candump.cpp)
# edit the following line to add the necessary libraries
TARGET_LINK_LIBRARIES(test_candump ${IRIUTILS_LIBRARY} comm pthread)
......@@ -23,7 +23,7 @@ int main(int argc,char *argv[])
CVirtualCAN can_port("can_port");
unsigned char data[8];
unsigned int can_id;
int i=0,len;
int len;
events.push_back(can_port.get_new_frame_event_id());
try{
......
......@@ -2,9 +2,8 @@ D2XX for Linux
--------------
As Linux distributions vary these instructions are a guide to installation
and use. FTDI has tested the driver and samples with Ubuntu 12.04 (kernel
version 3.2) for i386 and x86_64, and Debian 6 'squeeze' (kernel version
2.6.32) for arm926.
and use. FTDI has tested the driver with Ubuntu 14.04 (kernel version 3.13)
for i386 and x86_64, and Raspbian 7 (kernel version 3.18) for arm-v6-hf.
FTDI developed libftd2xx primarily to aid porting Windows applications
written with D2XX to Linux. We intend the APIs to behave the same on
......@@ -15,29 +14,32 @@ FTDI do not release the source code for libftd2xx. If you prefer to work
with source code and are starting a project from scratch, consider using
the open-source libFTDI.
libftd2xx uses an unmodified version of libusb
(http://sourceforge.net/projects/libusb/). Source code for libusb is
included in the driver distribution.
libftd2xx uses an unmodified version of libusb (http://libusb.info) which
is distributed under the terms of the GNU Lesser General Public License
(see libusb/COPYING or http://www.gnu.org/licenses). Source code for
libusb is included in this distribution.
Installing the D2XX shared library and static library.
------------------------------------------------------
1. tar xfvz libftd2xx1.1.12.tar.gz
1. tar xfvz libftd2xx-i386-1.3.6.tgz
This unpacks the archive, creating the following directory structure:
build
arm926
i386
x86_64
libftd2xx (re-linkable objects)
libusb (re-linkable objects)
libftd2xx.a (static library)
libftd2xx.so.1.3.6 (dynamic library)
libftd2xx.txt (platform-specific information)
examples
libusb
libusb (source code)
ftd2xx.h
WinTypes.h
2. cd build/arm926
2. cd build
3. sudo -s
or, if sudo is not available on your system:
......@@ -46,17 +48,17 @@ This unpacks the archive, creating the following directory structure:
Promotes you to super-user, with installation privileges. If you're
already root, then step 3 (and step 7) is not necessary.
4. cp lib* /usr/local/lib
4. cp libftd2xx.* /usr/local/lib
Copies the libraries to a central location.
5. chmod 0755 /usr/local/lib/libftd2xx.so.1.1.12
5. chmod 0755 /usr/local/lib/libftd2xx.so.1.3.6
Allows non-root access to the shared object.
6. ln -sf /usr/local/lib/libftd2xx.so.1.1.12 /usr/local/lib/libftd2xx.so
6. ln -sf /usr/local/lib/libftd2xx.so.1.3.6 /usr/local/lib/libftd2xx.so
Creates a symbolic link to the 1.1.12 version of the shared object.
Creates a symbolic link to the 1.3.6 version of the shared object.
7. exit
......
......@@ -3,61 +3,69 @@
#define WINAPI
#define MAX_NUM_DEVICES 50
#include <sys/time.h>
typedef unsigned int DWORD;
typedef unsigned int ULONG;
typedef unsigned short USHORT;
typedef unsigned short SHORT;
typedef unsigned char UCHAR;
typedef unsigned short WORD;
typedef unsigned char BYTE;
typedef BYTE *LPBYTE;
typedef unsigned int BOOL;
typedef unsigned char BOOLEAN;
typedef unsigned char CHAR;
typedef BOOL *LPBOOL;
typedef UCHAR *PUCHAR;
typedef const char *LPCSTR;
typedef char *PCHAR;
typedef void *PVOID;
typedef void *HANDLE;
typedef unsigned int LONG;
typedef int INT;
typedef unsigned int UINT;
typedef char *LPSTR;
typedef char *LPTSTR;
typedef const char *LPCTSTR;
typedef DWORD *LPDWORD;
typedef WORD *LPWORD;
typedef ULONG *PULONG;
typedef LONG *LPLONG;
typedef PVOID LPVOID;
typedef void VOID;
typedef unsigned long long int ULONGLONG;
typedef unsigned int DWORD;
typedef unsigned int ULONG;
typedef unsigned short USHORT;
typedef unsigned short SHORT;
typedef unsigned char UCHAR;
typedef unsigned short WORD;
typedef unsigned char BYTE;
typedef BYTE *LPBYTE;
typedef unsigned int BOOL;
typedef unsigned char BOOLEAN;
typedef unsigned char CHAR;
typedef BOOL *LPBOOL;
typedef UCHAR *PUCHAR;
typedef const char *LPCSTR;
typedef char *PCHAR;
typedef void *PVOID;
typedef void *HANDLE;
typedef unsigned int LONG;
typedef int INT;
typedef unsigned int UINT;
typedef char *LPSTR;
typedef char *LPTSTR;
typedef const char *LPCTSTR;
typedef DWORD *LPDWORD;
typedef WORD *LPWORD;
typedef ULONG *PULONG;
typedef LONG *LPLONG;
typedef PVOID LPVOID;
typedef void VOID;
typedef unsigned long long int ULONGLONG;
typedef struct _OVERLAPPED {
DWORD Internal;
DWORD InternalHigh;
DWORD Offset;
DWORD OffsetHigh;
HANDLE hEvent;
DWORD Internal;
DWORD InternalHigh;
DWORD Offset;
DWORD OffsetHigh;
HANDLE hEvent;
} OVERLAPPED, *LPOVERLAPPED;
typedef struct _SECURITY_ATTRIBUTES {
DWORD nLength;
LPVOID lpSecurityDescriptor;
BOOL bInheritHandle;
DWORD nLength;
LPVOID lpSecurityDescriptor;
BOOL bInheritHandle;
} SECURITY_ATTRIBUTES , *LPSECURITY_ATTRIBUTES;
#include <pthread.h>
// Substitute for HANDLE returned by Windows CreateEvent API.
// FT_SetEventNotification expects parameter 3 to be the address
// of one of these structures.
typedef struct _EVENT_HANDLE
{
pthread_cond_t eCondVar;
pthread_mutex_t eMutex;
int iVar;
} EVENT_HANDLE;
typedef struct timeval SYSTEMTIME;
typedef struct timeval FILETIME;
#ifndef TRUE
#define TRUE 1
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#define FALSE 0
#endif
//
......@@ -125,4 +133,4 @@ typedef struct timeval FILETIME;
#define INVALID_HANDLE_VALUE 0xFFFFFFFF
#endif
#endif
#endif /* __WINDOWS_TYPES__ */
libftd2xx.so.1.1.12
\ No newline at end of file
libftd2xx.so.1.3.6
\ No newline at end of file
libftd2xx.so.1.1.12
\ No newline at end of file
libftd2xx.so.1.3.6
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment