diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2023-11-16 15:34:50 +0700 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2023-11-21 00:58:53 +0700 |
commit | 82a1ae785ebf3fdf96d99539af51a2c1ac4ea411 (patch) | |
tree | 7e3cf38db9adf7a2dada418be602adad62f10a94 /include | |
parent | cdde67186b6b46ca102b6a13fc4a202a622fea57 (diff) |
soft_uart: make osmo_soft_uart_alloc() accept *cfg
Let the API user pass their own default config when allocating
a soft-UART. Make the default config publicly accessible.
Change-Id: I7e78d60c747a8805064d5e4bacfd47a30bc65cba
Related: OS#4396
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/core/soft_uart.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/osmocom/core/soft_uart.h b/include/osmocom/core/soft_uart.h index 71846ed0..2b9d67f5 100644 --- a/include/osmocom/core/soft_uart.h +++ b/include/osmocom/core/soft_uart.h @@ -72,9 +72,12 @@ struct osmo_soft_uart_cfg { void (*status_change_cb)(void *priv, unsigned int status); }; +extern const struct osmo_soft_uart_cfg osmo_soft_uart_default_cfg; + struct osmo_soft_uart; -struct osmo_soft_uart *osmo_soft_uart_alloc(void *ctx, const char *name); +struct osmo_soft_uart *osmo_soft_uart_alloc(void *ctx, const char *name, + const struct osmo_soft_uart_cfg *cfg); void osmo_soft_uart_free(struct osmo_soft_uart *suart); int osmo_soft_uart_configure(struct osmo_soft_uart *suart, const struct osmo_soft_uart_cfg *cfg); int osmo_soft_uart_set_rx(struct osmo_soft_uart *suart, bool enable); |