Your browser does not allow scripts
Please click here to view a static table of contents without scripts
JTAG_ExecuteCmdSequence
Return to Introduction  Previous page  Next page
Executes a sequence of commands stored in the internal command buffer.

FTC_STATUS
JTAG_ExecuteCmdSequence
(FTC_HANDLE ftHandle, PReadCmdSequenceDataByteBuffer pReadCmdSequenceDataBuffer, LPDWORD lpdwNumBytesReturned)  




Parameters
ftHandle
Handle of the device.
pReadCmdSequenceBuffer
Pointer to buffer that returns the data read from an external device. Size of buffer should be set to 131071 bytes (128KB).
lpdwNumBytesReturned
Pointer to the actual number of bytes read from the external device. These bytes contain the total number of bits read as specified in the sequence of read and write/read commands.




Return Value
Returns FTC_SUCCESS if successful, otherwise the return value will be one of the following error codes:

   FTC_INVALID_HANDLE
   FTC_NO_COMMAND_SEQUENCE
   FTC_NULL_READ_
CMDS_DATA_BUFFER_POINTER
   FTC_
FAILED_TO_COMPLETE_COMMAND
   FTC_IO_ERROR



Remarks
Do not invoke JTAG_Write, JTAG_READ or JTAG_WriteRead functions while constructing a sequence of commands as this will clear the sequence of commands and associated data from the internal command buffer.

Calling this function will send the contents of the internal command buffer to the FT2232C in one go.

This function can be used with
JTAG_ClearCmdSequence, JTAG_AddWriteCmd, JTAG_AddReadCmd and JTAG_AddWriteReadCmd to buffer a long list of commands and data which can then be sent to the FT2232C in one go . It can also be used with JTAG_ClearDeviceCmdSequence, JTAG_AddDeviceWriteCmd, JTAG_AddDeviceReadCmd and JTAG_AddDeviceWriteReadCmd when using multiple devices. This can provide faster data transfer rates in some applications.



Example

FTC_STATUS Status = FTC_SUCCESS;
FTC_HANDLE ftHandle;
ReadCmdSequenceDataByteBuffer ReadCmdSequenceDataBuffer;
DWORD dwNumBytesReturned = 0;

Status = JTAG_ExecuteCmdSequence(ftHandle, &ReadCmdSequenceDataBuffer, &dwNumBytesReturned);