We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72ed78e commit 9e5e77eCopy full SHA for 9e5e77e
src/modm/driver/pwm/ws2812b.hpp
@@ -14,6 +14,7 @@
14
#include <modm/architecture/interface/spi_master.hpp>
15
#include <modm/architecture/interface/unaligned.hpp>
16
#include <modm/ui/color.hpp>
17
+#include <modm/processing/resumable.hpp>
18
19
namespace modm
20
{
@@ -100,13 +101,10 @@ class Ws2812b
100
101
return {color[1], color[0], color[2]};
102
}
103
- void
104
+ modm::ResumableResult<void>
105
write()
106
- for (const auto value : data) {
107
- while (not SpiMaster::Hal::isTransmitRegisterEmpty()) ;
108
- SpiMaster::Hal::write(value);
109
- }
+ return SpiMaster::transfer(data, nullptr, length+1);
110
111
};
112
0 commit comments