Function Com_LSR() Foundation
Reads the Line Status Register.
Com_LSR( <nComPortNum> ;
) --> nLSR
Com_LSR() returns the contents of the Line Status Register as a numeric value. The function IsBit() must be used to detect which bits are set.
#define constants to be used for IsBit() are found in XBTCOM.CH
Bit | Constant | Description |
---|---|---|
No bit set | LSR_ERROR | something went wrong or LSR = 0 |
Bit 1 set | LSR_DATA_READY | there is data in the transmit buffer |
Bit 2 set | LSR_OVERRUN_ERR | buffer overflow or overflow in UART |
Bit 3 set | LSR_PARITY_ERR | UART detected a parity error |
Bit 4 set | LSR_FRAMING_ERR | UART detected a framing error |
Bit 5 set | LSR_BREAK | set if BREAK has been detected |
All other bits will be set to 0: | ||
LSR_TRANS_HOLD_EMPTY | not supported | |
LSR_TRANS_EMPTY | not supported |
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.