From: Martin Ling Date: Sat, 23 Nov 2013 12:04:21 +0000 (+0000) Subject: Add back previously deleted sp_get_config function. X-Git-Tag: libserialport-0.1.0~59 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=70cd37def2518cfa4c1170b16c94527b196a72a8;p=libserialport.git Add back previously deleted sp_get_config function. --- diff --git a/serialport.c b/serialport.c index 3a89609..f751888 100644 --- a/serialport.c +++ b/serialport.c @@ -1415,6 +1415,22 @@ static enum sp_return set_config(struct sp_port *port, struct port_data *data, RETURN_OK(); } +enum sp_return sp_get_config(struct sp_port *port, struct sp_port_config *config) +{ + struct port_data data; + + TRACE("%p, %p", port, config); + + CHECK_OPEN_PORT(); + + if (!config) + RETURN_ERROR(SP_ERR_ARG, "Null result pointer"); + + TRY(get_config(port, &data, config)); + + RETURN_OK(); +} + enum sp_return sp_set_config(struct sp_port *port, const struct sp_port_config *config) { struct port_data data;