serialCount
|
|
OutBuffer
|
|
A boolean integer specifying whether the input or output buffer should be checked. Must be one of the following values:
|
|
FALSE=0 returns the number of characters waiting in the receive buffer.
|
TRUE=0 returns the number of characters waiting in the transmit buffer.
|
Default value: FALSE
|
|
The number of characters waiting in the specified buffer.
|
|
|
ERR_OK
|
|
The flag set if successful.
|
|
ERR_FAILED
|
|
The flag set if failed.
|
|
ERR_NOTFOUND
|
|
No open port found.
|
|
To open and configure a serial port, use serialOpen.
|
|
|
This set of statements counts characters in s a serial port until its receive buffer contains 5 characters, reads a string from the port and prints it in the terminal window:
|
|
serialOpen (1,"19200,N,8,1")
|
|
Do
|
val=serialCount()
|
Loop While val<5
|
Print serialRead()
|
serialClose()
|