diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-11-13 22:58:14 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-11-13 22:58:14 +0100 |
commit | 4fe8a7598a92b7fc9c37749799e1d35bed7eed56 (patch) | |
tree | 326260e2595f143a970c1b6739e1e93425d9731e /include | |
parent | 28acb21321c27161841ea789112f10cb8d8eb9c8 (diff) |
serial: Introduce API osmo_serial_speed_t
This allows usual integer parsing at app level and calling this function
to make sure correct values will be passed to
osmo_serial_set_baudrate().
Change-Id: I41415c99d26128b33a8bf5ef7b38948bd1fe5d50
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/core/serial.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmocom/core/serial.h b/include/osmocom/core/serial.h index 39614a47..443275f2 100644 --- a/include/osmocom/core/serial.h +++ b/include/osmocom/core/serial.h @@ -32,5 +32,6 @@ int osmo_serial_init(const char *dev, speed_t baudrate); int osmo_serial_set_baudrate(int fd, speed_t baudrate); int osmo_serial_set_custom_baudrate(int fd, int baudrate); int osmo_serial_clear_custom_baudrate(int fd); +int osmo_serial_speed_t(unsigned int baudrate, speed_t *speed); /*! @} */ |