X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=lights.h;h=56345fb9f7819354299f419804d19653f2bdbd5b;hb=404cf862f8c6bb413580dce16d0a0bdab1037525;hp=9e3a43b5bc6f964f9c6aa3910900b2adcb9beed1;hpb=725eb5cc06d90f2d31fefe43cc0d02c21cf7698d;p=bike-lights.git diff --git a/lights.h b/lights.h index 9e3a43b..56345fb 100644 --- a/lights.h +++ b/lights.h @@ -5,6 +5,8 @@ #define N_PWMLEDS 3 #define N_PWMLED_MODES 4 +#define N_BUTTONS 2 + /* logging.c */ #ifdef USE_LOGGING void log_set_state(unsigned char val); @@ -39,6 +41,7 @@ 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_needs_adc(unsigned char n); +unsigned char pwmled_enabled(unsigned char n); /* gpio.c */ #define GPIO_LED1 0 @@ -55,6 +58,14 @@ 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(); +void timer_check_buttons(); + +/* init.c */ +void hw_setup(); #endif /* !LIGHTS_H__ */