libosmo-netif
0.2.0-dirty
Osmocom network interface library
|
00001 #ifndef _OSMO_RS232_H_ 00002 #define _OSMO_RS232_H_ 00003 00004 struct osmo_rs232; 00005 00006 struct osmo_rs232 *osmo_rs232_create(void *ctx); 00007 00008 void osmo_rs232_set_serial_port(struct osmo_rs232 *, const char *serial_port); 00009 void osmo_rs232_set_delay_us(struct osmo_rs232 *, int delay_us); 00010 void osmo_rs232_set_baudrate(struct osmo_rs232 *, int baudrate); 00011 void osmo_rs232_set_read_cb(struct osmo_rs232 *r, int (*read_cb)(struct osmo_rs232 *r)); 00012 00013 int osmo_rs232_open(struct osmo_rs232 *r); 00014 00015 int osmo_rs232_read(struct osmo_rs232 *r, struct msgb *msg); 00016 int osmo_rs232_write(struct osmo_rs232 *r, struct msgb *msg); 00017 00018 void osmo_rs232_close(struct osmo_rs232 *r); 00019 void osmo_rs232_destroy(struct osmo_rs232 *r); 00020 00021 #endif /* _OSMO_RS232_H_ */