浏览代码

Implement backlight scheme of TentaPad

core
Kai Ryu 9 年前
父节点
当前提交
fcbddae2cc
共有 1 个文件被更改,包括 4 次插入6 次删除
  1. 4
    6
      common/softpwm_led.c

+ 4
- 6
common/softpwm_led.c 查看文件

@@ -253,15 +253,13 @@ ISR(TIMER1_COMPA_vect)
{
static uint8_t pwm = 0;
pwm++;
// LED on
if (pwm == 0) {
for (uint8_t i = 0; i < LED_COUNT; i++) {
for (uint8_t i = 0; i < LED_COUNT; i++) {
// LED on
if (pwm == 0) {
softpwm_led_on(i);
softpwm_led_ocr[i] = softpwm_led_ocr_buff[i];
}
}
// LED off
for (uint8_t i = 0; i < LED_COUNT; i++) {
// LED off
if (pwm == softpwm_led_ocr[i]) {
softpwm_led_off(i);
}