From: Martin Ling Date: Thu, 14 Nov 2013 21:39:56 +0000 (+0000) Subject: Add prototypes for config helper functions. X-Git-Tag: libserialport-0.1.0~121 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=80186526b28fdd306148155cb9d4b2e78637783e;p=libserialport.git Add prototypes for config helper functions. --- diff --git a/serialport.c b/serialport.c index 83cb529..e612ae2 100644 --- a/serialport.c +++ b/serialport.c @@ -58,6 +58,19 @@ struct sp_port_data { #endif }; +/* Helper functions for configuring ports. */ +static int start_config(struct sp_port *port, struct sp_port_data *data); +static int set_baudrate(struct sp_port_data *data, int baudrate); +static int set_bits(struct sp_port_data *data, int bits); +static int set_parity(struct sp_port_data *data, int parity); +static int set_stopbits(struct sp_port_data *data, int stopbits); +static int set_rts(struct sp_port_data *data, int rts); +static int set_cts(struct sp_port_data *data, int cts); +static int set_dtr(struct sp_port_data *data, int dtr); +static int set_dsr(struct sp_port_data *data, int dsr); +static int set_xon_xoff(struct sp_port_data *data, int xon_xoff); +static int apply_config(struct sp_port *port, struct sp_port_data *data); + int sp_get_port_by_name(const char *portname, struct sp_port **port_ptr) { struct sp_port *port;