6 #define N_PWMLED_MODES 4
13 void log_set_state(unsigned char val);
15 void log_byte(unsigned char byte);
16 void log_word(uint16_t word);
18 void inline init_log() { }
19 void inline log_set_state(unsigned char val) { }
20 void inline log_flush() { }
21 void inline log_byte(unsigned char byte) { }
22 void inline log_word(uint16_t word) { }
30 #define PWM_MAX 0x1E4 /* This should be different than ADC frequency 125 kHz */
31 #define PWM_STEP_SHIFT 2 /* second parameter of pwm_set is shifted by
32 * PWM_STEP_SHIFT bits to the right before setting
37 void pwm_off(unsigned char n);
38 void pwm_set(unsigned char n, uint16_t stride);
42 extern volatile uint16_t jiffies;
48 void pwmled_adc(unsigned char n, uint16_t adcval);
49 void pwmled_set_mode(unsigned char n, unsigned char mode);
54 void gpio_set(unsigned char n, unsigned char on);
58 extern volatile unsigned char ambient_zone;
59 void ambient_adc(uint16_t adc_val);
63 unsigned char mode: 3;
64 unsigned char duration: 5;
67 #define PATTERN_FOREVER 0x1F
68 #define PATTERN_END { 0, 0 }
70 void patterns_next_tick();
71 void led_set_pattern(unsigned char led, pattern_t *pattern);
72 pattern_t *number_pattern(unsigned char num, unsigned char inv);
73 void pattern_reload();
76 #define MAX_USER_PARAMS 3
79 void timer_check_buttons();
80 unsigned char get_user_param(unsigned char param);
81 unsigned char buttons_wait_for_release();
82 unsigned char buttons_setup_in_progress();
83 pattern_t *buttons_setup_status0_pattern_select();
84 pattern_t *buttons_setup_status1_pattern_select();
87 extern volatile unsigned char battery_100mv;
92 extern pattern_t on1_pattern[];
95 void toggle_dim_mode();
96 void set_panic_mode();
97 pattern_t *pwmled0_pattern_select();
98 pattern_t *pwmled1_pattern_select();
99 pattern_t *pwmled2_pattern_select();
100 pattern_t *status_led_pattern_select();
101 pattern_t *illumination_led_pattern_select();
106 #endif /* !LIGHTS_H__ */