drivers: uart: nrf_uarte: Generate RX_RDY after rx_disable

So far, when rx_disable was called then received data was discarded.
This is currently not according to the API but it is needed if
rx_disabled is called due to out of band information about end of
packet.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2020-05-14 09:24:52 +02:00 committed by Carles Cufí
commit 62087be265

View file

@ -762,8 +762,8 @@ static void endrx_isr(struct device *dev)
.type = UART_RX_DISABLED,
};
user_callback(dev, &evt);
return;
}
return;
}
data->async->is_in_irq = true;
@ -813,6 +813,11 @@ static void endrx_isr(struct device *dev)
user_callback(dev, &evt);
}
if (!data->async->rx_enabled) {
data->async->is_in_irq = false;
return;
}
struct uart_event evt = {
.type = UART_RX_BUF_RELEASED,
.data.rx_buf.buf = data->async->rx_buf,
@ -1263,6 +1268,7 @@ static int uarte_instance_init(struct device *dev,
NRF_UARTE_Type *uarte = get_uarte_instance(dev);
struct uarte_nrfx_data *data = get_dev_data(dev);
nrf_gpio_pin_write(config->pseltxd, 1);
nrf_gpio_cfg_output(config->pseltxd);