Trigger transmission of enqueued data.
- Note
- Groups channels by clock pin, acquires DMA buffers, calls transmit()
Implements fl::IChannelDriver.
Definition at line 237 of file spi_channel_adapter.cpp.hpp.
237 {
239
241 }
243 return;
244 }
245
247
248
251
253 if (ctrl.controller->supportsStreaming()) {
257 return;
258 }
259 }
260
261
263
264 FL_DBG(
"SpiChannelEngineAdapter: Grouped into " << groups.size() <<
" SPI configuration groups");
265
266
267 for (size_t i = 0; i < groups.size(); i++) {
269
270 FL_DBG(
"SpiChannelEngineAdapter: Transmitting group with clock pin " << group.clockPin <<
" (" << group.channels.size() <<
" channels)");
271
273 FL_WARN(
"SpiChannelEngineAdapter: Failed to transmit batch for clock pin " << group.clockPin);
274
275 }
276 }
277
278 FL_DBG(
"SpiChannelEngineAdapter: show() complete");
279}
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.
DriverState advanceStreaming() FL_NO_EXCEPT
Advance ordered streaming channels after the preceding source is reaped.
size_t mNextStreamingChannel
fl::vector< ControllerInfo > mControllers
All managed controllers.
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 advanceStreaming(), fl::SpiChannelEngineAdapter::ClockPinGroup::channels, fl::SpiChannelEngineAdapter::ClockPinGroup::clockPin, FL_DBG, fl::FL_NO_EXCEPT, FL_WARN, groupByClockPin(), mControllers, mEnqueuedChannels, mNextStreamingChannel, fl::fl::adl_barrier::move(), mStreamingFrame, mTransmittingChannels, fl::vector_basic::size(), and transmitBatch().