Application Note
AN_329 User Guide For LibFT4222
Version 1.5
Document Reference No.: FT_001060 Clearance No.: FTDI#406
15
Product Page
Document Feedback Copyright © Future Technology Devices International Limited
GPIO3 acts as a wakeup pin. An example is provided with the support-lib. The file is located in the
following path:
example\samples\interrupt\interrupt.cpp
Parameters:
TRUE to configure GPIO3 as an input pin for wakeup/interrupt.
FALSE to switch back to GPIO3.
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.
Example:
Please refer to the example in FT4222_SetInterruptTrigger.
3.2.7 Set Interrupt Trigger Condition
FT4222_STATUS FT4222_SetInterruptTrigger(FT_HANDLE ftHandle, GPIO_Trigger trigger)
Supported Chip:
Summary:
Set trigger condition for the pin wakeup/interrupt. By default, the trigger condition is
GPIO_TRIGGER_RISING.
This function configures trigger condition for wakeup/interrupt.
When GPIO3 acts as wakeup pin. It means that ft4222H device has the capability to wake up the
host. Only GPIO_TRIGGER_RISING and GPIO_TRIGGER_FALLING are valid when GPIO3 act as a
wakeup pin. . It is not necessary to call FT4222_GPIO_Init to set up wake-up function.
When GPIO3 acts as interrupt pin. All trigger condition can be set. The result of trigger status can
be inquired by FT4222_GPIO_ReadTriggerQueue or FT4222_GPIO_Read. This is because the
trigger status is provided by the GPIO pipe. Therefore it is necessary to call FT4222_GPIO_Init to
set up interrupt function.
For GPIO triggering conditions, GPIO_TRIGGER_LEVEL_HIGH and GPIO_TRIGGER_LEVEL_LOW,
that can be configured when GPIO3 behaves as an interrupt pin, when the system enters suspend
mode, these two configurations will act as GPIO_TRIGGER_RISING and GPIO_FALLING
respectively.