Download BL600 smartBASIC Module

Transcript
smart BASIC
User Manual
bitMask
byVal bitMask AS INTEGER
Bit 0 is set to flush the rx buffer and Bit 1 to flush the tx buffer.
Interactive Command: No
Related Commands:
UARTOPEN,UARTINFO, UARTCLOSE, UARTWRITE, UARTREAD,
UARTREADMATCH, UARTGETCTS, UARTGETDCD, UARTGETRI, UARTGETDSR,
UARTSETRTS, UARTSETDCD, UARTBREAK, UARTFLUSH
DIM rv
//--- Open comport so that DCD and RI are inputs
rv=UartOpen(300,0,0,”TO81H”)
If rv==0 then
UartFLUSH(1)
endif
//open as DTE at 300 baudrate, odd parity
//8 databits, 1 stopbits, cts/rts flow control
//flush the receive buffer
UARTFLUSH is a core subroutine.
UartGetCTS
This function is used to read the current state of the CTS modem status input line.
If the device does not expose a CTS input line, then this function will return a value that signifies
an asserted line.
UARTGETCTS()
Function
Returns:
INTEGER Indicates the status of the CTS line:
0 : CTS line is NOT asserted
1 : CTS line is asserted
Exceptions
Arguments:

Local Stack Frame Underflow

Local Stack Frame Overflow

Uart has not been opened using UARTOPEN
None
Interactive Command: No
www.lairdtech.com
122
Laird Technologies