mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Added single colour mode to WS2811 driver for RAM savings.
This commit is contained in:
parent
7393d5fdac
commit
37d0d402c8
6 changed files with 52 additions and 63 deletions
|
@ -33,8 +33,7 @@ extern "C" {
|
|||
extern "C" {
|
||||
STATIC_UNIT_TESTED extern uint16_t dmaBufferOffset;
|
||||
|
||||
STATIC_UNIT_TESTED void fastUpdateLEDDMABuffer(rgbColor24bpp_t *color);
|
||||
STATIC_UNIT_TESTED void updateLEDDMABuffer(uint8_t componentValue);
|
||||
STATIC_UNIT_TESTED void updateLEDDMABuffer(rgbColor24bpp_t *color);
|
||||
}
|
||||
|
||||
TEST(WS2812, updateDMABuffer) {
|
||||
|
@ -45,13 +44,7 @@ TEST(WS2812, updateDMABuffer) {
|
|||
dmaBufferOffset = 0;
|
||||
|
||||
// when
|
||||
#if 0
|
||||
updateLEDDMABuffer(color1.rgb.g);
|
||||
updateLEDDMABuffer(color1.rgb.r);
|
||||
updateLEDDMABuffer(color1.rgb.b);
|
||||
#else
|
||||
fastUpdateLEDDMABuffer(&color1);
|
||||
#endif
|
||||
updateLEDDMABuffer(&color1);
|
||||
|
||||
// then
|
||||
EXPECT_EQ(24, dmaBufferOffset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue