We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a555524 commit d33871cCopy full SHA for d33871c
drivers/serial/uart_nrf_sw_lpuart.c
@@ -791,14 +791,28 @@ static int api_rx_disable(const struct device *dev)
791
792
data->rx_state = RX_TO_OFF;
793
794
+ if (data->rx_buf) {
795
+ struct uart_event buf_rel_evt = {
796
+ .type = UART_RX_BUF_RELEASED,
797
+ .data = {
798
+ .rx_buf = {
799
+ .buf = data->rx_buf
800
+ }
801
802
+ };
803
+
804
+ data->rx_buf = NULL;
805
+ user_callback(dev, &buf_rel_evt);
806
807
808
err = uart_rx_disable(data->uart);
809
if (err == -EFAULT) {
810
811
struct uart_event event = {
812
.type = UART_RX_DISABLED
813
};
814
815
data->rx_state = RX_OFF;
- data->rx_buf = NULL;
816
user_callback(dev, &event);
817
}
818
0 commit comments