You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/10/21 03:21:32 UTC
[GitHub] [incubator-nuttx] ken-voly opened a new pull request #4712: Fix can_poll() POLLOUT calculation
ken-voly opened a new pull request #4712:
URL: https://github.com/apache/incubator-nuttx/pull/4712
## Summary
`can_poll()` would indicated that there is no space in the TX FIFO when there is already one element in the FIFO. The calculation at
https://github.com/apache/incubator-nuttx/blob/7183009400131d8764c3d9521b72c32369a04b15/drivers/can/can.c#L1132-L1141
should match the calculation at
https://github.com/apache/incubator-nuttx/blob/7183009400131d8764c3d9521b72c32369a04b15/drivers/can/can.c#L801-L813
when determining if there is space in the FIFO (increment tail then compare with head). This is because new elements are added at the tail, not the head.
## Impact
`can_poll()` now behaves correctly. More than one CAN frame can be inserted in to the FIFO when using `poll()` to check for space in the FIFO.
## Testing
Tested on PX4. More than one frame can be written to the CAN driver at a time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #4712: Fix can_poll() POLLOUT calculation
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #4712:
URL: https://github.com/apache/incubator-nuttx/pull/4712
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org