]> sigrok.org Git - libserialport.git/blobdiff - libserialport.h.in
Replace sp_set_params with sp_set_config, which takes a struct.
[libserialport.git] / libserialport.h.in
index f9f5b243a9fa37923d69887b936a8855cce32dfc..9eb5e0cc626f477cb5250c95caa265f28db400ab 100644 (file)
@@ -52,6 +52,17 @@ struct sp_port {
 #endif
 };
 
+/* Configuration for a serial port. */
+struct sp_port_config {
+       int baudrate;
+       int bits;
+       int parity;
+       int stopbits;
+       int flowcontrol;
+       int rts;
+       int dtr;
+};
+
 /* Return values. */
 enum {
        /* Operation completed successfully. */
@@ -104,8 +115,7 @@ int sp_close(struct sp_port *port);
 int sp_flush(struct sp_port *port);
 int sp_write(struct sp_port *port, const void *buf, size_t count);
 int sp_read(struct sp_port *port, void *buf, size_t count);
-int sp_set_params(struct sp_port *port, int baudrate, int bits, int parity,
-               int stopbits, int flowcontrol, int rts, int dtr);
+int sp_set_config(struct sp_port *port, struct sp_port_config *config);
 int sp_last_error_code(void);
 char *sp_last_error_message(void);
 void sp_free_error_message(char *message);