Simple 8x8 LED Matrix controller which interfaces with a Processing GUI over serial to display sketches
Dependencies: Multi_WS2811 mbed
Fork of Multi_WS2811_test by
Revision 9:dd524af149e6, committed 2012-11-14
- Comitter:
- heroic
- Date:
- Wed Nov 14 05:06:29 2012 +0000
- Parent:
- 8:e3249c2b7607
- Child:
- 10:62368b801d16
- Commit message:
- Mask interrupts during critical section.
Changed in this revision
| WS2811.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/WS2811.cpp Sat Nov 10 05:58:14 2012 +0000
+++ b/WS2811.cpp Wed Nov 14 05:06:29 2012 +0000
@@ -31,6 +31,7 @@
*/
void WS2811::write(uint8_t byte) {
+ __disable_irq();
for (int i=0; i<8; i++) {
if (byte & 0x80)
writebit(1);
@@ -38,6 +39,7 @@
writebit(0);
byte <<= 1;
}
+ __enable_irq();
}
inline void WS2811::celldelay(void) {
