From e4632ebba234cbb2f365b29a0c5ea83fb4fb1f35 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Wed, 8 Jul 2015 02:35:07 +0300 Subject: [PATCH] STM32 NuttX facepalm fix --- libuavcan_drivers/stm32/driver/src/uc_stm32_thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libuavcan_drivers/stm32/driver/src/uc_stm32_thread.cpp b/libuavcan_drivers/stm32/driver/src/uc_stm32_thread.cpp index cdc54cadd1..eb93cc215f 100644 --- a/libuavcan_drivers/stm32/driver/src/uc_stm32_thread.cpp +++ b/libuavcan_drivers/stm32/driver/src/uc_stm32_thread.cpp @@ -105,7 +105,7 @@ int BusEvent::poll(::file* filp, ::pollfd* fds, bool setup) * - Transmission complete. This event is edge-triggered. * FIXME Since TX event is edge-triggered, it can be lost between poll() calls. */ - fds->revents |= fds->events & (can_driver_.hasReadableInterfaces() ? 0 : POLLIN); + fds->revents |= fds->events & (can_driver_.hasReadableInterfaces() ? POLLIN : 0); if (fds->revents != 0) { (void)sem_post(fds->sem);