From ac74fdafca3200577b4d55b086a32a652282b267 Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Sun, 27 Oct 2013 17:24:12 +0000 Subject: [PATCH] Add enum values for flow control settings. --- serialport.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/serialport.h b/serialport.h index 4e79340..dafe99b 100644 --- a/serialport.h +++ b/serialport.h @@ -67,6 +67,16 @@ enum { SP_PARITY_ODD = 2 }; +/* Flow control settings. */ +enum { + /* No flow control. */ + SP_FLOW_NONE = 0, + /* Hardware (RTS/CTS) flow control. */ + SP_FLOW_HARDWARE = 1, + /* Software (XON/XOFF) flow control. */ + SP_FLOW_SOFTWARE = 2 +}; + char **sp_list_ports(void); void sp_free_port_list(char **ports); int sp_open(struct sp_port *port, char *portname, int flags);