serial.flush
serial.flush
Function
Flushes the output buffer of an open serial port.
Syntax
device.open(config).flush()
Parameters
No parameters.
Return value
| Type | Description |
|---|---|
| Bool | Returns true if the refresh is successful. |
Example
port = device.open({type: 'serial', port: 'COM3'}) result = port.flush() // Output: true print result
Notes
- Throws an underlying device error on failure.