| 184 | } |
| 185 | |
| 186 | i32 PixelStream::bytesRemaining() const { |
| 187 | if (mType == kStreaming) { |
| 188 | // Use (max)() to prevent macro expansion by Arduino.h's max macro |
| 189 | return (fl::numeric_limits<i32>::max)(); |
| 190 | } |
| 191 | return mHandle->bytesLeft(); |
| 192 | } |
| 193 | |
| 194 | i32 PixelStream::bytesRemainingInFrame() const { |
| 195 | return bytesRemaining() % mbytesPerFrame; |