]> www.fi.muni.cz Git - bike-lights.git/commitdiff
pwmled_is_on renamed to pwmled_needs_adc
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Wed, 29 Aug 2012 14:03:11 +0000 (16:03 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Wed, 29 Aug 2012 14:03:11 +0000 (16:03 +0200)
adc.c
lights.h
pwmled.c

diff --git a/adc.c b/adc.c
index 9a5e31438834a7408acfd7e086935a14781da37f..a6547e30e81f74c64b82fd73b1c9fc39515fe324 100644 (file)
--- a/adc.c
+++ b/adc.c
@@ -28,7 +28,7 @@ static void start_next_adc()
                --current_adc;
 
                // test if current_adc should be measured
-               if (current_adc < N_PWMLEDS && pwmled_is_on(current_adc))
+               if (current_adc < N_PWMLEDS && pwmled_needs_adc(current_adc))
                        goto found;
                if (current_adc == AMBIENT_ADC)
                        goto found;
index 2559e57e534339a62ebd648031ce045d9c688099..9e3a43b5bc6f964f9c6aa3910900b2adcb9beed1 100644 (file)
--- a/lights.h
+++ b/lights.h
@@ -38,7 +38,7 @@ void init_tmr();
 void pwmled_init();
 void pwmled_adc(unsigned char n, uint16_t adcval);
 void pwmled_set_mode(unsigned char n, unsigned char mode);
-unsigned char pwmled_is_on(unsigned char n);
+unsigned char pwmled_needs_adc(unsigned char n);
 
 /* gpio.c */
 #define GPIO_LED1 0
index ac0e4445cd803eb1f8b9fc0416ae87915e693b66..df8bc07635ddb1545f899e88b1b93a04443b37f3 100644 (file)
--- a/pwmled.c
+++ b/pwmled.c
@@ -42,7 +42,7 @@ void pwmled_init()
        }
 }
 
-unsigned char pwmled_is_on(unsigned char n)
+unsigned char pwmled_needs_adc(unsigned char n)
 {
        unsigned char st = pwmled_state[n];
        if (st == ST_PROBING || st == ST_ON)