fifo len
This commit is contained in:
parent
97ce195c49
commit
831931a37d
2 changed files with 1 additions and 3 deletions
|
@ -35,8 +35,6 @@ unsigned OneColor::to_string(char * ptr, const int m) {
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
ws2812b::ws2812b (FIFO<uint32_t,8> & r) noexcept : OneWay (), ring(r) {
|
|
||||||
}
|
|
||||||
unsigned int ws2812b::Send (uint8_t * const ptr, const unsigned int len) {
|
unsigned int ws2812b::Send (uint8_t * const ptr, const unsigned int len) {
|
||||||
uint32_t cmd;
|
uint32_t cmd;
|
||||||
while (ring.Read(cmd)) {
|
while (ring.Read(cmd)) {
|
||||||
|
|
|
@ -44,7 +44,7 @@ static constexpr unsigned FIFOLEN = 8u; // min. depth je 8, jinak mocnina 2 >=
|
||||||
class ws2812b : public OneWay<uint8_t> {
|
class ws2812b : public OneWay<uint8_t> {
|
||||||
FIFO<uint32_t,FIFOLEN> & ring;
|
FIFO<uint32_t,FIFOLEN> & ring;
|
||||||
public:
|
public:
|
||||||
explicit ws2812b (FIFO<uint32_t,FIFOLEN> & r) noexcept;
|
explicit ws2812b (FIFO<uint32_t,FIFOLEN> & r) noexcept : OneWay (), ring(r) {}
|
||||||
unsigned int Send (uint8_t * const ptr, const unsigned int len) override;
|
unsigned int Send (uint8_t * const ptr, const unsigned int len) override;
|
||||||
protected:
|
protected:
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue