mirror of
https://github.com/micropython/micropython.git
synced 2026-04-23 17:30:23 +02:00
zephyr/machine_uart: Ignore return value of uart_irq_update.
For uart_irq_update() the allowed return values are a negative errno or 1. 0 is not allowd. Therefore ignore the return value. Also the return type might soon be changed to void. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
This commit is contained in:
@@ -265,7 +265,7 @@ static mp_uint_t mp_machine_uart_ioctl(mp_obj_t self_in, mp_uint_t request, uint
|
||||
static void uart_interrupt_handler(const struct device *dev, void *user_data) {
|
||||
machine_uart_obj_t *self = (machine_uart_obj_t *)user_data;
|
||||
|
||||
while (uart_irq_update(dev) && uart_irq_is_pending(dev)) {
|
||||
while (uart_irq_update(dev), uart_irq_is_pending(dev)) {
|
||||
if (uart_irq_rx_ready(dev)) {
|
||||
uint8_t _rx_buffer[32];
|
||||
size_t _free_space = MIN(ringbuf_free(&self->rx_ringbuffer), sizeof(_rx_buffer));
|
||||
|
||||
Reference in New Issue
Block a user