Source code for the Curilights Controller. See http://www.saccade.com/writing/projects/CuriController/ for details.

Dependencies:   FatFileSystem mbed

This is the source code for the Curilights controller. This lets you interactively control a string of Curilights. It provides a simple click-wheel user interface for changing colors, brightness and behavior. It responds to movement and lighting.

Finished Controller

/media/uploads/isonno/nxp3872_controllerclose.jpg

System Block Diagram

/media/uploads/isonno/blockdiagram.png

Committer:
isonno
Date:
Mon Feb 11 05:04:18 2013 +0000
Revision:
4:cfef06d8bb96
Parent:
0:6da5625a6946
Minor changes to add backlight routines.  Not hooked up yet, shouldn't affect build operation.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
isonno 0:6da5625a6946 1 // Simple class to disable interrupts in a C++ code block
isonno 0:6da5625a6946 2 // Does the right thing when nested calls are made.
isonno 0:6da5625a6946 3
isonno 0:6da5625a6946 4 #include "HoldInterrupts.h"
isonno 0:6da5625a6946 5
isonno 0:6da5625a6946 6 static int gHoldInterruptLevel = 0;
isonno 0:6da5625a6946 7
isonno 0:6da5625a6946 8 HoldInterrupts::HoldInterrupts()
isonno 0:6da5625a6946 9 {
isonno 0:6da5625a6946 10 if (gHoldInterruptLevel == 0)
isonno 0:6da5625a6946 11 __disable_irq();
isonno 0:6da5625a6946 12 gHoldInterruptLevel++;
isonno 0:6da5625a6946 13 }
isonno 0:6da5625a6946 14
isonno 0:6da5625a6946 15 HoldInterrupts::~HoldInterrupts()
isonno 0:6da5625a6946 16 {
isonno 0:6da5625a6946 17 gHoldInterruptLevel--;
isonno 0:6da5625a6946 18 if (gHoldInterruptLevel == 0)
isonno 0:6da5625a6946 19 __enable_irq();
isonno 0:6da5625a6946 20 }