* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef SERIALPORT_H
+#define SERIALPORT_H
+
#include <stddef.h>
#ifdef _WIN32
#include <windows.h>
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);
int sp_close(struct sp_port *port);
int sp_flush(struct sp_port *port);
int sp_last_error_code(void);
char *sp_last_error_message(void);
void sp_free_error_message(char *message);
+
+#endif /* SERIALPORT_H */