Function Com_MCR() Foundation

Sets or retrieves the Modem Control Register.

Syntax
Com_MCR( <nComPortNum>, ;
         [<nMCR>]       ;
       ) --> nMCR
Return

Com_MCR() returns the contents of the Modem Control Register as a numeric value. The function IsBit() must be used to detect which bits are set.

Com_MCR() returns always 0 since Windows does not support the contents of the Modem Control Register to be read or changed.

Description

If parameter <nMCR> is specified the Modem Control Register will be set accordingly, otherwise the current contents of the MCR will be returned.

#define constants to be used for IsBit() are found in XBTCOM.CH

Bits set in return value:
Bit Constant Description
No bit set MCR_ERROR Something went wrong
Bit 1 set MCR_DTR Data Terminal Ready is currently on
Bit 2 set MCR_RTS Request To Send is currently on

The value of all other bits depends on the features of the device driver.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.