Supported Operating Systems by FT_Write
Linux
Mac OS X (10.4 and later)
Windows (2000 and later)
Windows CE (4.2 and later)
Summary of FT_Write
Write data to the device.
Definition of FT_Write
FT_STATUS FT_Write (FT_HANDLE ftHandle, LPVOID lpBuffer, DWORD dwBytesToWrite,
LPDWORD lpdwBytesWritten)
Parameters of FT_Write
ftHandle Handle of the device.
lpBuffer Pointer to the buffer that contains the data to be written to the
device.
dwBytesToWrite Number of bytes to write to the device.
lpdwBytesWritten Pointer to a variable of type DWORD which receives the number of
bytes written to the device.
Return Value of FT_Write
FT_OK if successful, otherwise the return value is an FT error code.
Example of FT_Write
FT_HANDLE ftHandle;
FT_STATUS ftStatus;
DWORD BytesWritten;
char TxBuffer[256]; // Contains data to write to device
ftStatus = FT_Open(0, &ftHandle);
if(ftStatus != FT_OK) {
// FT_Open failed
return;
}
ftStatus = FT_Write(ftHandle, TxBuffer, sizeof(TxBuffer), &BytesWritten);
if (ftStatus == FT_OK) {
// FT_Write OK
}
else {
// FT_Write Failed
}
}
FT_Close(ftHandle);
暂无评论内容