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.h
- Revision:
- 3:2b5b03a3c0a5
- Parent:
- 2:1c2c9c8788a8
- Child:
- 4:586d20c99dbf
--- a/WS2811.h Wed Apr 02 10:53:43 2014 +0000
+++ b/WS2811.h Wed Apr 02 11:54:27 2014 +0000
@@ -12,6 +12,10 @@
//
// Modified by Ned Konz, December 2013.
// Using three-phase DMA ala Paul Stoffegren's version.
+//
+// Modified by richard Thompson, Marhc 2014.
+// Uses 8-bit DMA transfers instead of 32-bit, uses 1/4 of the RAM.
+// Now capable of running 240 LEDs on one pin
#ifndef MBED_WS2811_H
#define MBED_WS2811_H
@@ -24,15 +28,26 @@
extern "C" void DMA0_IRQHandler();
extern "C" void TPM0_IRQHandler();
+/**
+* WS2811/n
+* LED Strip controller
+*/
class WS2811 : public LedStrip
{
public:
+ /** Set up the LED strip
+ @param n Number of LEDs on the strip. Must be less than MAX_LEDS_PER_STRIP
+ @param pinNumber Pin number on PORTD. 0-7.
+ */
WS2811(unsigned n, unsigned pinNumber);
virtual void begin();
virtual void show();
virtual void blank();
+ /** Send a level update to all the WS2811 LED strips
+ * All updates happen in parallel, ensure all (max. 8) strips have complete data before calling this.
+ */
static void startDMA();
private:
