FastLED 3.9.15
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 287 of file multi_lane_device.cpp.hpp.

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

References FL_WARN, and pImpl.

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

+ Here is the caller graph for this function: