aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-11-16 15:17:37 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-11-21 00:58:53 +0700
commitcdde67186b6b46ca102b6a13fc4a202a622fea57 (patch)
tree998400e378113474bb60c19b2ffc7b394e838c37 /include
parentb72625d40e890bc42a3074b9af18a77ef0f568d3 (diff)
soft_uart: split osmo_soft_uart_enable()
The problem with a single function controlling both Rx and Tx is that enabling/disabling one of the directions requires knowing state of the other one. In other words, disabling Tx requires knowing the state of Rx, which may be inconvenient. Change-Id: Ieacc7e639304eeb14fdb298c7e14d772c136ca6e Related: OS#4396
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/core/soft_uart.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/osmocom/core/soft_uart.h b/include/osmocom/core/soft_uart.h
index 4f9c1fcf..71846ed0 100644
--- a/include/osmocom/core/soft_uart.h
+++ b/include/osmocom/core/soft_uart.h
@@ -77,7 +77,8 @@ struct osmo_soft_uart;
struct osmo_soft_uart *osmo_soft_uart_alloc(void *ctx, const char *name);
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_enable(struct osmo_soft_uart *suart, bool rx, bool tx);
+int osmo_soft_uart_set_rx(struct osmo_soft_uart *suart, bool enable);
+int osmo_soft_uart_set_tx(struct osmo_soft_uart *suart, bool enable);
int osmo_soft_uart_rx_ubits(struct osmo_soft_uart *suart, const ubit_t *ubits, size_t n_ubits);
int osmo_soft_uart_tx_ubits(struct osmo_soft_uart *suart, ubit_t *ubits, size_t n_ubits);