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:
parent
3a25c75ad9
commit
62087be265
1 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue