]> www.fi.muni.cz Git - tinyboard.git/blobdiff - projects/step-up/lights.h
pwmled.c: separate target setting and on/off switching
[tinyboard.git] / projects / step-up / lights.h
index 986ffcb7ec935eac3ae6faef0881b26d844e0cb7..d409d9d3f98b8f9b557b140c93ef4fa6af0ba347 100644 (file)
@@ -3,8 +3,6 @@
 
 #define TESTING_FW 1
 
-#define N_LEDS 7
-#define N_PWMLEDS 2
 #define N_PWMLED_MODES 4
 
 #define N_BUTTONS 2
@@ -31,17 +29,11 @@ void susp_adc();
 void timer_start_slow_adcs();
 
 /* pwm.c */
-/*
- * The real Timer/Counter 1 frequency should not be too close to the
- * A/D converter frequency (125 kHz). Note that this is not the Top
- * value of T/C 1, it is shifted by PWM_STEP_SHIFT as described in pwm.c
- */
-#define PWM_MAX 0x340
+#define PWM_MAX 0xFF
 void init_pwm();
 void susp_pwm();
-void pwm_off(unsigned char n);
-void pwm_set(unsigned char n, uint16_t stride);
-void pwm_timer();
+void pwm_off();
+void pwm_set(uint8_t stride);
 
 /* tmr.c */
 extern volatile uint16_t jiffies;
@@ -50,8 +42,9 @@ void susp_tmr();
 
 /* pwmled.c */
 void init_pwmled();
-void pwmled_adc(unsigned char n, uint16_t adcval);
-void pwmled_set_mode(unsigned char n, unsigned char mode);
+void pwmled_adc(uint16_t adcval);
+void pwmled_set_target(unsigned char mode);
+void pwmled_on_off(unsigned char on);
 
 /* gpio.c */
 void init_gpio();