serialClear
Top  Previous  Next

serialClear ( )

Use this function to clear the input and output buffers of the currently open serial port.

Parameters

None  
 
Error flags
 
ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  
 
ERR_NOTFOUND  
 
No open port found.  

Remark
 
To open and configure a serial port, use serialOpen.  
 
Example
 
serialOpen (1,"19200,N,8,1")  
serialWrite("Serial port test")  
serialClear()