From 122758143ae32fae402cbe180c83c93199438bcd Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Mon, 11 Nov 2024 19:17:24 +0100 Subject: [PATCH] drivers/slipdev: implement NETDEV_EVENT_TX_COMPLETE event --- drivers/slipdev/slipdev.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/slipdev/slipdev.c b/drivers/slipdev/slipdev.c index 333f363860..ff6880a5b6 100644 --- a/drivers/slipdev/slipdev.c +++ b/drivers/slipdev/slipdev.c @@ -233,6 +233,11 @@ static int _send(netdev_t *netdev, const iolist_t *iolist) } slipdev_write_byte(dev->config.uart, SLIPDEV_END); slipdev_unlock(); + + if (netdev->event_callback) { + netdev->event_callback(netdev, NETDEV_EVENT_TX_COMPLETE); + } + return bytes; } @@ -322,6 +327,9 @@ static int _get(netdev_t *netdev, netopt_t opt, void *value, size_t max_len) assert(max_len == sizeof(uint16_t)); *((uint16_t *)value) = NETDEV_TYPE_SLIP; return sizeof(uint16_t); + case NETOPT_TX_END_IRQ: + *((netopt_enable_t *)value) = NETOPT_ENABLE; + return sizeof(netopt_enable_t); #if IS_USED(MODULE_SLIPDEV_L2ADDR) case NETOPT_ADDRESS_LONG: assert(max_len == sizeof(eui64_t));