X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=firmware%2Flights.h;h=08503482734fe3396bcc453061356a4a5827745a;hb=1dc3de1bbcd220f0fd5e78bc2e60eebbebf07fd2;hp=b159ae8cee2390bcd808a6b1a1bf2662fc161edb;hpb=c637efbe0eb8d07f2358faa5f0c4ffc1387534ea;p=bike-lights.git diff --git a/firmware/lights.h b/firmware/lights.h index b159ae8..0850348 100644 --- a/firmware/lights.h +++ b/firmware/lights.h @@ -29,11 +29,15 @@ void timer_start_adcs(); /* pwm.c */ #define PWM_MAX 0x1E4 /* This should be different than ADC frequency 125 kHz */ +#define PWM_STEP_SHIFT 2 /* second parameter of pwm_set is shifted by + * PWM_STEP_SHIFT bits to the right before setting + * into HW */ void init_pwm(); void susp_pwm(); void pwm_off(unsigned char n); void pwm_set(unsigned char n, uint16_t stride); +void pwm_timer(); /* tmr.c */ extern volatile uint16_t jiffies; @@ -44,13 +48,11 @@ void susp_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_enabled(unsigned char n); /* gpio.c */ void gpio_init(); void susp_gpio(); void gpio_set(unsigned char n, unsigned char on); -void gpio_before_poweroff(); /* ambient.c */ void ambient_init(); @@ -78,9 +80,11 @@ pattern_t *number_pattern(unsigned char num); /* buttons.c */ #define MAX_USER_PARAMS 3 void init_buttons(); +void susp_buttons(); void timer_check_buttons(); unsigned char get_user_param(unsigned char param); pattern_t *status_pattern_select(unsigned char n); +unsigned char buttons_wait_for_release(); /* battery.c */ extern volatile unsigned char battery_100mv;