EasyManua.ls Logo

FTDI LibFT4222 - SPI Master Set Lines

Default Icon
78 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Application Note
AN_329 User Guide For LibFT4222
Version 1.5
Document Reference No.: FT_001060 Clearance No.: FTDI#406
25
Product Page
Document Feedback Copyright © Future Technology Devices International Limited
FT_HANDLE ftHandle2 = NULL;
FT_STATUS ftStatus;
FT4222_STATUS ft4222Status;
ftStatus = FT_Open(0, &ftHandle1);
if (FT_OK != ftStatus)
{
// open failed
return;
}
ftStatus = FT_Open(1, &ftHandle2);
if (FT_OK != ftStatus)
{
// open failed
return;
}
ft4222Status = FT4222_SPIMaster_Init(ftHandle1, SPI_IO_SINGLE, CLK_DIV_4,
CLK_IDLE_LOW, CLK_LEADING, 0x03);
if (FT4222_OK != ft4222Status)
{
// spi master init failed
return;
}
ft4222Status = FT4222_SPIMaster_Init(ftHandle2, SPI_IO_SINGLE, CLK_DIV_4,
CLK_IDLE_LOW, CLK_LEADING, 0x03);
if (FT4222_OK != ft4222Status)
{
// spi master init failed
return;
}
FT4222_UnInitialize(ftHandle1);
FT4222_UnInitialize(ftHandle2);
FT_Close(ftHandle1);
FT_Close(ftHandle2);
3.3.2 SPI Master Set Lines
FT4222_STATUS FT4222_SPIMaster_SetLines(FT_HANDLE ftHandle, FT4222_SPIMode spiMode)
Supported Chip:
FT4222 chip version
Supported
FT4222 Rev A
YES
FT4222 Rev B
YES
FT4222 Rev C
YES
FT4222 Rev D
YES
Summary:
Switch the FT4222H SPI master to single, dual, or quad mode. This overrides the mode passed to
FT4222_SPIMaster_init. This might be needed if a device accepts commands in single mode but
data transfer is to use dual or quad mode.

Table of Contents