MPSSE APIs. More...
#include "ftd2xx.h"
Go to the source code of this file.
Data Structures | |
struct | ChannelConfig_t |
Macros | |
#define | FTDI_API |
Bit defination of the transferOptions parameter in SPI_Read, SPI_Write & SPI_Transfer | |
#define | SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES 0x00000000 |
#define | SPI_TRANSFER_OPTIONS_SIZE_IN_BITS 0x00000001 |
#define | SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE 0x00000002 |
#define | SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE 0x00000004 |
Bit defination of the Options member of configOptions structure | |
#define | SPI_CONFIG_OPTION_MODE_MASK 0x00000003 |
#define | SPI_CONFIG_OPTION_MODE0 0x00000000 |
#define | SPI_CONFIG_OPTION_MODE1 0x00000001 |
#define | SPI_CONFIG_OPTION_MODE2 0x00000002 |
#define | SPI_CONFIG_OPTION_MODE3 0x00000003 |
#define | SPI_CONFIG_OPTION_CS_MASK 0x0000001C |
#define | SPI_CONFIG_OPTION_CS_DBUS3 0x00000000 |
#define | SPI_CONFIG_OPTION_CS_DBUS4 0x00000004 |
#define | SPI_CONFIG_OPTION_CS_DBUS5 0x00000008 |
#define | SPI_CONFIG_OPTION_CS_DBUS6 0x0000000C |
#define | SPI_CONFIG_OPTION_CS_DBUS7 0x00000010 |
#define | SPI_CONFIG_OPTION_CS_ACTIVELOW 0x00000020 |
Typedefs | |
typedef unsigned char | uint8 |
typedef unsigned short | uint16 |
typedef unsigned long long | uint64 |
typedef signed char | int8 |
typedef signed short | int16 |
typedef signed long long | int64 |
typedef unsigned long | uint32 |
typedef signed long | int32 |
typedef enum I2C_ClockRate_t | I2C_CLOCKRATE |
typedef struct ChannelConfig_t | ChannelConfig |
Enumerations | |
enum | I2C_ClockRate_t { I2C_CLOCK_STANDARD_MODE = 100000 , I2C_CLOCK_FAST_MODE = 400000 , I2C_CLOCK_FAST_MODE_PLUS = 1000000 , I2C_CLOCK_HIGH_SPEED_MODE = 3400000 } |
MPSSE APIs.
MIT License
Copyright (c) [2011] [Future Technology Devices International Limited (FTDI)]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project: libMPSSE Module: SPI
Rivision History: 0.1 - initial version 0.2 - 20110708 - added FT_ReadGPIO, FT_WriteGPIO & SPI_ChangeCS 0.3 - 20111025 - modified for supporting 64bit linux 0.41 - 20140903 - modified for compilation issues with either C application/C++ application
Definition in file libMPSSE_spi.h.
#define FTDI_API |
Definition at line 53 of file libMPSSE_spi.h.
#define SPI_CONFIG_OPTION_CS_ACTIVELOW 0x00000020 |
Definition at line 84 of file libMPSSE_spi.h.
#define SPI_CONFIG_OPTION_CS_DBUS3 0x00000000 |
000 00
Definition at line 78 of file libMPSSE_spi.h.
#define SPI_CONFIG_OPTION_CS_DBUS4 0x00000004 |
001 00
Definition at line 79 of file libMPSSE_spi.h.
#define SPI_CONFIG_OPTION_CS_DBUS5 0x00000008 |
010 00
Definition at line 80 of file libMPSSE_spi.h.
#define SPI_CONFIG_OPTION_CS_DBUS6 0x0000000C |
011 00
Definition at line 81 of file libMPSSE_spi.h.
#define SPI_CONFIG_OPTION_CS_DBUS7 0x00000010 |
100 00
Definition at line 82 of file libMPSSE_spi.h.
#define SPI_CONFIG_OPTION_CS_MASK 0x0000001C |
111 00
Definition at line 77 of file libMPSSE_spi.h.
#define SPI_CONFIG_OPTION_MODE0 0x00000000 |
Definition at line 72 of file libMPSSE_spi.h.
#define SPI_CONFIG_OPTION_MODE1 0x00000001 |
Definition at line 73 of file libMPSSE_spi.h.
#define SPI_CONFIG_OPTION_MODE2 0x00000002 |
Definition at line 74 of file libMPSSE_spi.h.
#define SPI_CONFIG_OPTION_MODE3 0x00000003 |
Definition at line 75 of file libMPSSE_spi.h.
#define SPI_CONFIG_OPTION_MODE_MASK 0x00000003 |
Definition at line 71 of file libMPSSE_spi.h.
#define SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE 0x00000004 |
transferOptions-Bit2: if BIT2 is 1 then CHIP_SELECT line will be disabled at end of transfer
Definition at line 66 of file libMPSSE_spi.h.
#define SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE 0x00000002 |
transferOptions-Bit1: if BIT1 is 1 then CHIP_SELECT line will be enabled at start of transfer
Definition at line 64 of file libMPSSE_spi.h.
#define SPI_TRANSFER_OPTIONS_SIZE_IN_BITS 0x00000001 |
transferOptions-Bit0: If this bit is 1 then it means that the transfer size provided is in bytes
Definition at line 62 of file libMPSSE_spi.h.
#define SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES 0x00000000 |
transferOptions-Bit0: If this bit is 0 then it means that the transfer size provided is in bytes
Definition at line 60 of file libMPSSE_spi.h.
typedef struct ChannelConfig_t ChannelConfig |
typedef enum I2C_ClockRate_t I2C_CLOCKRATE |
typedef signed short int16 |
Definition at line 97 of file libMPSSE_spi.h.
typedef signed long int32 |
Definition at line 106 of file libMPSSE_spi.h.
typedef signed long long int64 |
Definition at line 98 of file libMPSSE_spi.h.
typedef signed char int8 |
Definition at line 96 of file libMPSSE_spi.h.
typedef unsigned short uint16 |
Definition at line 93 of file libMPSSE_spi.h.
typedef unsigned long uint32 |
Definition at line 105 of file libMPSSE_spi.h.
typedef unsigned long long uint64 |
Definition at line 94 of file libMPSSE_spi.h.
typedef unsigned char uint8 |
Definition at line 92 of file libMPSSE_spi.h.
enum I2C_ClockRate_t |
Enumerator | |
---|---|
I2C_CLOCK_STANDARD_MODE | 100kb/sec |
I2C_CLOCK_FAST_MODE | 400kb/sec |
I2C_CLOCK_FAST_MODE_PLUS | 1000kb/sec |
I2C_CLOCK_HIGH_SPEED_MODE | 3.4Mb/sec |
Definition at line 110 of file libMPSSE_spi.h.
FTDI_API void Cleanup_libMPSSE | ( | void | ) |
FTDI_API void Init_libMPSSE | ( | void | ) |
FTDI_API FT_STATUS SPI_GetChannelInfo | ( | uint32 | index, |
FT_DEVICE_LIST_INFO_NODE * | chanInfo | ||
) |
FTDI_API FT_STATUS SPI_InitChannel | ( | FT_HANDLE | handle, |
ChannelConfig * | config | ||
) |
FTDI_API FT_STATUS SPI_Read | ( | FT_HANDLE | handle, |
uint8 * | buffer, | ||
uint32 | sizeToTransfer, | ||
uint32 * | sizeTransfered, | ||
uint32 | options | ||
) |
FTDI_API FT_STATUS SPI_ReadWrite | ( | FT_HANDLE | handle, |
uint8 * | inBuffer, | ||
uint8 * | outBuffer, | ||
uint32 | sizeToTransfer, | ||
uint32 * | sizeTransferred, | ||
uint32 | transferOptions | ||
) |