21.07.2015 Views

Programming Info D2XXPG31.pdf

Programming Info D2XXPG31.pdf

Programming Info D2XXPG31.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FT-Win32 API Functions925.15 FT_W32_SetCommMaskThis function specifies events that the device has to monitor.BOOL FT_W32_SetCommMask (FT_HANDLE ftHandle, DWORD dwMask)ParametersftHandledwMaskEV_BREAKEV_CTSEV_DSREV_ERREV_RINGEV_RLSDEV_RXCHAREV_RXFLAGEV_TXEMPTYHandle of the device.Mask containing aevents that the device has to monitor. Thiscan be a combination of the following:BREAK condition detectedChange in Clear to Send (CTS)Change in Data Set Ready (DSR)Error in line statusRing Indicator (RI) detectedChange in Receive Line Signal Detect (RLSD)Character receivedEvent character receivedTransmitter emptyReturn ValueIf the function is successful, the return value is nonzero.If the function is unsuccessful, the return value is zero.RemarksThis function specifies the events that the device should monitor. An application can call thefunction FT_W32_WaitCommEvent to wait for an event to occur.Linux does not support the W32 API.ExampleThis example shows how to monitor changes in the modem status lines DSR and CTS.FT_HANDLE ftHandle; // setup by FT_W32_CreateFileDWORD dwMask = EV_CTS | EV_DSR;if (!FT_W32_SetCommMAsk(ftHandle,dwMask)); // FT_W32_SetCommMask failedelse; // FT_W32_SetCommMask OK© Future Technology Devices International Ltd. 2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!