Trigger transmission of enqueued data.
- Note
- Groups channels by clock pin, acquires DMA buffers, calls transmit()
Implements fl::IChannelDriver.
Definition at line 233 of file spi_channel_adapter.cpp.hpp.
233 {
235 return;
236 }
237
239
240
243
244
246
247 FL_DBG(
"SpiChannelEngineAdapter: Grouped into " << groups.size() <<
" SPI configuration groups");
248
249
250 for (size_t i = 0; i < groups.size(); i++) {
252
253 FL_DBG(
"SpiChannelEngineAdapter: Transmitting group with clock pin " << group.clockPin <<
" (" << group.channels.size() <<
" channels)");
254
256 FL_WARN(
"SpiChannelEngineAdapter: Failed to transmit batch for clock pin " << group.clockPin);
257
258 }
259 }
260
261 FL_DBG(
"SpiChannelEngineAdapter: show() complete");
262}
bool transmitBatch(fl::span< const ChannelDataPtr > channels) FL_NO_EXCEPT
Transmit a batch of channels sharing one SPI configuration.
fl::vector< ClockPinGroup > groupByClockPin(fl::span< const ChannelDataPtr > channels) FL_NO_EXCEPT
Group adjacent channels with matching pins, host, and clock rate.
fl::vector< ChannelDataPtr > mEnqueuedChannels
Channels waiting for show()
fl::vector< ChannelDataPtr > mTransmittingChannels
Channels currently transmitting.
Channels sharing one SPI bus configuration.
constexpr remove_reference< T >::type && move(T &&t) FL_NO_EXCEPT
References fl::SpiChannelEngineAdapter::ClockPinGroup::channels, fl::SpiChannelEngineAdapter::ClockPinGroup::clockPin, FL_DBG, fl::FL_NO_EXCEPT, FL_WARN, groupByClockPin(), mEnqueuedChannels, fl::fl::adl_barrier::move(), mTransmittingChannels, fl::vector_basic::size(), and transmitBatch().