FTC_STATUS
|
JTAG_GetGPIOs
|
(FTC_HANDLE ftHandle, BOOL bControlLowInputOutputPins, PFTC_LOW_HIGH_PINS pLowPinsInputData, BOOL bControlHighInputOutputPins, PFTC_LOW_HIGH_PINS pHighPinsInputData)
|
Parameters
ftHandle
|
Handle of the device.
|
bControlLowInputOutputPins
|
Enables or disables reading of the lower 4 GPIO pins.
|
pLowPinsInputData
|
Pointer to a structure that contains the value of the lower 4 GPIO pins of the FT2232C device.
|
bControlHighInputOutputPins
|
Enables or disables reading of the upper 4 GPIO pins.
|
pHighPinsInputData
|
Pointer to a structure that contains the value of the upper 4 GPIO pins of the FT2232C device.
|
Return Value
FTC_SUCCESS if successful, otherwise the return value is one of the following FTC error codes:
FTC_INVALID_HANDLE
FTC_NULL_INPUT_OUTPUT_BUFFER_POINTER
FTC_FAILED_TO_COMPLETE_COMMAND
FTC_IO_ERROR
Remarks
This function allows the state of the 8 general purpose input/output (GPIO) pins to be read as either high or low. The pins can be configured as input, low output or high output using the JTAG_SetGPIOs function.
The definition of the FTC_LOW_HIGH_PINS structure is given in the Appendix.
Example
FTC_STATUS Status = FTC_SUCCESS;
FTC_HANDLE ftHandle;
FTC_LOW_HIGH_PINS LowPinsInputData;
FTC_LOW_HIGH_PINS HighPinsInputData;
Status = JTAG_GetGPIOs(ftHandle, true, &LowPinsInputData, true, &HighPinsInputData);