FastLED
3.9.3
Loading...
Searching...
No Matches
bytestream.h
1
#pragma once
2
3
#include <stddef.h>
4
#include <stdint.h>
5
6
#include "namespace.h"
7
#include "ref.h"
8
9
#include "crgb.h"
10
11
FASTLED_NAMESPACE_BEGIN
12
13
FASTLED_SMART_REF(
ByteStream
);
14
15
// An abstract class that represents a file handle.
16
// Devices like the SD card will return one of these.
17
class
ByteStream
:
public
Referent
{
18
public
:
19
virtual
~ByteStream
() {}
20
virtual
bool
available(
size_t
)
const
= 0;
21
virtual
size_t
read(uint8_t *dst,
size_t
bytesToRead) = 0;
22
virtual
const
char
*path()
const
= 0;
23
virtual
void
close() {}
// default is do nothing on close.
24
25
// convenience functions
26
size_t
read(
CRGB
*dst,
size_t
n) {
return
read((uint8_t *)dst, n * 3); }
27
};
28
29
30
31
FASTLED_NAMESPACE_END
ByteStream
Definition
bytestream.h:17
Referent
Definition
ref.h:384
CRGB
Representation of an RGB pixel (Red, Green, Blue)
Definition
crgb.h:39
src
fx
storage
bytestream.h
Generated on Thu Nov 14 2024 00:00:34 for FastLED by
1.11.0