FastLED
3.9.3
Loading...
Searching...
No Matches
bytestreammemory.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 "bytestream.h"
10
#include "fx/detail/circular_buffer.h"
11
12
FASTLED_NAMESPACE_BEGIN
13
14
FASTLED_SMART_REF(
ByteStreamMemory
);
15
16
class
ByteStreamMemory
:
public
ByteStream
{
17
public
:
18
ByteStreamMemory
(uint32_t size_buffer);
19
~ByteStreamMemory
()
override
;
20
bool
available(
size_t
n)
const override
;
21
size_t
read(uint8_t *dst,
size_t
bytesToRead)
override
;
22
void
clear() {
23
mBuffer.clear();
24
}
25
const
char
*path()
const override
{
return
"ByteStreamMemory"
; }
26
size_t
write(
const
uint8_t* src,
size_t
n);
27
size_t
write(
const
CRGB
* src,
size_t
n);
28
29
private
:
30
CircularBuffer<uint8_t>
mBuffer;
31
};
32
33
FASTLED_NAMESPACE_END
ByteStream
Definition
bytestream.h:17
ByteStreamMemory
Definition
bytestreammemory.h:16
CircularBuffer
Definition
circular_buffer.h:12
CRGB
Representation of an RGB pixel (Red, Green, Blue)
Definition
crgb.h:39
src
fx
storage
bytestreammemory.h
Generated on Thu Nov 14 2024 00:00:34 for FastLED by
1.11.0