Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Multi_WS2811 by
Diff: WS2811.cpp
- Revision:
- 7:58623ad7f310
- Parent:
- 6:3b5b8a367f40
diff -r 3b5b8a367f40 -r 58623ad7f310 WS2811.cpp
--- a/WS2811.cpp Wed Apr 02 12:16:42 2014 +0000
+++ b/WS2811.cpp Wed Apr 02 13:22:25 2014 +0000
@@ -212,8 +212,8 @@
NVIC_EnableIRQ(TPM0_IRQn);
}
-WS2811::WS2811(unsigned n, unsigned pinNumber)
- : LedStrip(n)
+WS2811::WS2811(uint16_t pixelCount, uint8_t pinNumber)
+ : LedStrip(pixelCount)
, pinMask(1U << pinNumber)
{
enabledPins |= pinMask;
@@ -224,7 +224,7 @@
void WS2811::startDMA()
{
hw_init();
-
+
wait_for_dma_done();
dma_done = false;
@@ -386,7 +386,7 @@
extern "C" void TPM0_IRQHandler()
{
TPM0->SC = 0; // disable internal clocking
- TPM0->SC = TPM_SC_TOF_MASK;
+ TPM0->SC = TPM_SC_TOF_MASK;
RESET_DEBUG;
WS2811::dma_done = true;
}
