summaryrefslogtreecommitdiff
path: root/usb-i2c-sl018/ledmatrix.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2013-02-06 21:10:12 +0000
committerChristian Pointner <equinox@spreadspace.org>2013-02-06 21:10:12 +0000
commit760c0daa1d02531fd6722b44d156f6be6e0a1c51 (patch)
treee7f7fbfdaeefed6c309d209e4cdd6286a24d5873 /usb-i2c-sl018/ledmatrix.c
parentmoved keystore and usb/serial to seperate files (diff)
fixed include for memset
ledmatrix() can be invoked serveral times without troubles git-svn-id: https://svn.spreadspace.org/avr/trunk@135 aa12f405-d877-488e-9caf-2d797e2a1cc7
Diffstat (limited to 'usb-i2c-sl018/ledmatrix.c')
-rw-r--r--usb-i2c-sl018/ledmatrix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usb-i2c-sl018/ledmatrix.c b/usb-i2c-sl018/ledmatrix.c
index cc0abd2..2682c14 100644
--- a/usb-i2c-sl018/ledmatrix.c
+++ b/usb-i2c-sl018/ledmatrix.c
@@ -184,9 +184,11 @@ void init_ledmatrix(void)
void ledmatrix(ledmatrix_mode_t m)
{
+ if(m == mode)
+ return;
+
mode = m;
ledmatrix_stop_timer();
-
switch(mode)
{
case off: ledmatrix_off_init(); break;