Application Note
AN_329 User Guide For LibFT4222
Version 1.5
Document Reference No.: FT_001060 Clearance No.: FTDI#406
64
Product Page
Document Feedback Copyright © Future Technology Devices International Limited
Parameters:
An array defines the directions of 4 GPIO pins. The GPIO direction will be:
GPIO_OUTPUT
GPIO_INPUT
Return Value:
FT4222_OK if successful, otherwise the return value is an FT error code.
Error code:
FT4222_DEVICE_NOT_SUPPORTED: This device is not a FT4222 chip.
FT4222_GPIO_NOT_SUPPORTED_IN_THIS_MODE: GPIO function is not supported in mode 2 and
mode 3
Example:
Please refer to the example in FT4222_GPIO_Read.
3.8.2 GPIO Read
FT4222_STATUS FT4222_GPIO_Read(FT_HANDLE ftHandle, GPIO_Port portNum, BOOL* pValue)
Supported Chip:
Summary:
Read the status of a specified GPIO pin or interrupt register.
Parameters:
One of the following GPIO ports:
GPIO_PORT0
GPIO_PORT1
GPIO_PORT2
GPIO_PORT3
Pointer to a variable of type BOOL which receives the value of the GPIO pin.
For GPIO :
TRUE means voltage level is high now
FALSE mean voltage level is low now
For Interrupt:
TRUE means trigger condition is invoked
FALSE means trigger condition is not invoked
Interrupt status is cleared after calling this function.
Return Value:
FT4222_OK if successful, otherwise the return value is an FT error code.