This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 6073671f7e69691d27b2dd5ee170855f2fbe61cd Author: raiden00pl <[email protected]> AuthorDate: Wed Nov 18 19:00:36 2026 +0100 drivers/serial/uart_16550: Report pending work from u16550_interrupt(). Return nonzero if the UART had an interrupt pending. The handler of an interrupt shared by several UARTs needs this to know when none of them asserts the interrupt any more. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: raiden00pl <[email protected]> --- drivers/serial/uart_16550.c | 2 +- include/nuttx/serial/uart_16550.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/serial/uart_16550.c b/drivers/serial/uart_16550.c index 4dd8d69cd6e..a7acd96f45c 100644 --- a/drivers/serial/uart_16550.c +++ b/drivers/serial/uart_16550.c @@ -1902,7 +1902,7 @@ int u16550_interrupt(int irq, FAR void *context, FAR void *arg) } } - return OK; + return passes > 0; } /**************************************************************************** diff --git a/include/nuttx/serial/uart_16550.h b/include/nuttx/serial/uart_16550.h index b312908d2df..436332663c7 100644 --- a/include/nuttx/serial/uart_16550.h +++ b/include/nuttx/serial/uart_16550.h @@ -444,6 +444,9 @@ int u16550_bind(FAR uart_dev_t *dev); * Description: * Handle UART 16550 interrupt. * + * Returned Value: + * Nonzero if the UART had an interrupt pending. + * ****************************************************************************/ int u16550_interrupt(int irq, FAR void *context, FAR void *arg);
