FastLED 3.10.8
Loading...
Searching...
No Matches

◆ lane()

Lane & fl::spi::MultiLaneDevice::lane ( size_t lane_id)

Get access to a specific lane.

Parameters
lane_idLane index (0 to numLanes()-1)
Returns
Reference to Lane object
Note
Panics if lane_id is out of range

Definition at line 286 of file multi_lane_device.cpp.hpp.

286 {
287 if (!pImpl || lane_id >= pImpl->lanes.size()) {
288 FL_WARN("MultiLaneDevice: Invalid lane ID " << lane_id);
289 // Return first lane as fallback (avoid crash)
290 static Lane dummy_lane(0, nullptr); // okay static in header
291 return dummy_lane;
292 }
293 return pImpl->lanes[lane_id];
294}
fl::unique_ptr< Impl > pImpl
#define FL_WARN(...)
Definition log.h:437

References fl::FL_NO_EXCEPT, FL_WARN, and pImpl.

Referenced by end(), flush(), and operator=().

+ Here is the caller graph for this function: