mirror of
git://sigrok.org/libserialport
synced 2023-08-10 21:13:24 +03:00
Split up prototypes in include file for clarity.
This commit is contained in:
parent
9069c2fbb2
commit
e96d8bd288
@ -132,16 +132,23 @@ enum {
|
||||
SP_XONXOFF_INOUT = 3
|
||||
};
|
||||
|
||||
/* Enumeration */
|
||||
int sp_get_port_by_name(const char *portname, struct sp_port **port_ptr);
|
||||
void sp_free_port(struct sp_port *port);
|
||||
int sp_list_ports(struct sp_port ***list_ptr);
|
||||
int sp_copy_port(const struct sp_port *port, struct sp_port **copy_ptr);
|
||||
void sp_free_port_list(struct sp_port **ports);
|
||||
|
||||
/* Opening & closing ports */
|
||||
int sp_open(struct sp_port *port, int flags);
|
||||
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);
|
||||
|
||||
/* Reading, writing and flushing. */
|
||||
int sp_read(struct sp_port *port, void *buf, size_t count);
|
||||
int sp_write(struct sp_port *port, const void *buf, size_t count);
|
||||
int sp_flush(struct sp_port *port);
|
||||
|
||||
/* Port configuration */
|
||||
int sp_set_config(struct sp_port *port, struct sp_port_config *config);
|
||||
int sp_set_baudrate(struct sp_port *port, int baudrate);
|
||||
int sp_set_bits(struct sp_port *port, int bits);
|
||||
@ -152,6 +159,8 @@ int sp_set_cts(struct sp_port *port, int cts);
|
||||
int sp_set_dtr(struct sp_port *port, int dtr);
|
||||
int sp_set_dsr(struct sp_port *port, int dsr);
|
||||
int sp_set_xon_xoff(struct sp_port *port, int xon_xoff);
|
||||
|
||||
/* Error handling */
|
||||
int sp_last_error_code(void);
|
||||
char *sp_last_error_message(void);
|
||||
void sp_free_error_message(char *message);
|
||||
|
Loading…
Reference in New Issue
Block a user