EasyManua.ls Logo

FTDI LibFT4222 - Set Interrupt Trigger Condition

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
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:
ftHandle
Handle of the device.
enable
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:
FT4222 chip version
Supported
FT4222 Rev A
YES
FT4222 Rev B
YES
FT4222 Rev C
YES
FT4222 Rev D
YES
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.

Table of Contents