完善V1.4踢乒乓球版本
This commit is contained in:
1 parent
d14fe6c37b
commit
72455a5e76
1864 files changed
+19294
-218
No files matched your search
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include "fl/stdint.h"
|
||||
|
||||
#include "fl/namespace.h"
|
||||
#include "fl/memory.h"
|
||||
|
||||
#include "fl/bytestream.h"
|
||||
#include "fl/circular_buffer.h"
|
||||
#include "fl/int.h"
|
||||
|
||||
namespace fl {
|
||||
|
||||
FASTLED_SMART_PTR(ByteStreamMemory);
|
||||
|
||||
class ByteStreamMemory : public ByteStream {
|
||||
public:
|
||||
ByteStreamMemory(fl::u32 size_buffer);
|
||||
~ByteStreamMemory() override;
|
||||
bool available(fl::size n) const override;
|
||||
fl::size read(fl::u8 *dst, fl::size bytesToRead) override;
|
||||
void clear() { mReadBuffer.clear(); }
|
||||
const char *path() const override { return "ByteStreamMemory"; }
|
||||
fl::size write(const fl::u8 *src, fl::size n);
|
||||
fl::size writeCRGB(const CRGB *src, fl::size n);
|
||||
|
||||
private:
|
||||
CircularBuffer<fl::u8> mReadBuffer;
|
||||
};
|
||||
|
||||
} // namespace fl
|
||||
Reference in new issue
Block a user