Modified CAN driver API: Passing the next pending TX frames into the select() call to facilitate proper prioritization in the driver

This commit is contained in:
Pavel Kirienko
2015-07-05 18:46:21 +03:00
parent b4ba088e08
commit 8d923fee4c
10 changed files with 127 additions and 24 deletions
@@ -532,7 +532,9 @@ public:
* early returns.
* Also it can return more events than were originally requested by uavcan, which is also acceptable.
*/
std::int16_t select(uavcan::CanSelectMasks& inout_masks, uavcan::MonotonicTime blocking_deadline) override
std::int16_t select(uavcan::CanSelectMasks& inout_masks,
const uavcan::CanFrame* (&)[uavcan::MaxCanIfaces],
uavcan::MonotonicTime blocking_deadline) override
{
// Detecting whether we need to block at all
bool need_block = (inout_masks.write == 0); // Write queue is infinite