Skip to content

Commit c16a484

Browse files
maass-hamburgdpgeorge
authored andcommitted
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>
1 parent 8abca6b commit c16a484

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ports/zephyr/machine_uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ static mp_uint_t mp_machine_uart_ioctl(mp_obj_t self_in, mp_uint_t request, uint
265265
static void uart_interrupt_handler(const struct device *dev, void *user_data) {
266266
machine_uart_obj_t *self = (machine_uart_obj_t *)user_data;
267267

268-
while (uart_irq_update(dev) && uart_irq_is_pending(dev)) {
268+
while (uart_irq_update(dev), uart_irq_is_pending(dev)) {
269269
if (uart_irq_rx_ready(dev)) {
270270
uint8_t _rx_buffer[32];
271271
size_t _free_space = MIN(ringbuf_free(&self->rx_ringbuffer), sizeof(_rx_buffer));

0 commit comments

Comments
 (0)