FastLED 3.10.6
Loading...
Searching...
No Matches

◆ frameCount()

fl::size fl::Fled::frameCount ( fl::size ledCount) const

Definition at line 97 of file fled.cpp.hpp.

97 {
98 if (!mImpl || ledCount == 0) return 0;
99 const fl::u8 bpp = fl::fled::bytesPerLed(mImpl->pixelFormatByte());
100 if (bpp == 0) return 0;
101 const fl::size perFrame = ledCount * static_cast<fl::size>(bpp);
102 if (perFrame == 0) return 0;
103 return mImpl->payloadLen() / perFrame;
104}
fl::shared_ptr< fled::FledImpl > mImpl
Definition fled.h:156
fl::u8 bytesPerLed(fl::u8 pixelFormat) FL_NO_EXCEPT
unsigned char u8
Definition stdint.h:131

References fl::fled::bytesPerLed(), fl::FL_NO_EXCEPT, and mImpl.

+ Here is the call graph for this function: