Select best controller for a given clock pin.
- Parameters
-
| clockPin | Clock pin number to route |
- Returns
- Controller index, or -1 if none available
Definition at line 101 of file spi_channel_adapter.cpp.hpp.
101 {
102
104 if (assignment.clockPin == clockPin) {
105 return assignment.controllerIndex;
106 }
107 }
108
109
110 int bestIndex = -1;
111 int bestPriority = -1;
112
115 continue;
116 }
117
119 bestIndex = i;
121 }
122 }
123
124
125 if (bestIndex >= 0) {
127 }
128
129 return bestIndex;
130}
fl::vector< ControllerInfo > mControllers
All managed controllers.
bool canControllerHandleClockPin(const ControllerInfo &ctrl, int clockPin) const
Check if controller can handle this clock pin.
fl::vector< ClockPinAssignment > mClockPinAssignments
Clock pin → controller mapping.
References canControllerHandleClockPin(), mClockPinAssignments, and mControllers.
Referenced by transmitBatch().