STM32 NuttX facepalm fix

This commit is contained in:
Pavel Kirienko 2015-07-08 02:35:07 +03:00
parent 4f79527860
commit e4632ebba2

View File

@ -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);