]> www.fi.muni.cz Git - bike-lights.git/commitdiff
led_set_status function
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Wed, 29 Aug 2012 22:57:05 +0000 (00:57 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Fri, 31 Aug 2012 21:08:11 +0000 (23:08 +0200)
lights.h
pattern.c

index ec2397f0e80629eb32c476c8fbd87ec102aea4c7..d357b55d8906aa28c192f85b3457298fb1796ecf 100644 (file)
--- a/lights.h
+++ b/lights.h
@@ -58,6 +58,7 @@ void ambient_adc(uint16_t adc_val);
 /* pattern.c */
 void pattern_init();
 void patterns_next_tick();
+void led_set_status(unsigned char status);
 
 /* buttons.c */
 void init_buttons();
index 363868610dfc8f3487c15ce694c5c76f60f943ad..64d8640fed70a871442be8e4386d2a741e3c7b9e 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -154,3 +154,7 @@ void patterns_next_tick()
        }
 }
 
+void led_set_status(unsigned char status)
+{
+       led_set_pattern(N_PWMLEDS+1, number_pattern(status));
+}