got LEDs working, ribbon trail program initially implemented
- fixed soft I2C master set hi/lo routines - fixed bug in matrix_send not setting all LEDs from map - fix AWU interrupt not firing; requires EXTI line to be configured too even if unused - fixed wrong dividers used in system clock set function
This commit is contained in:
@@ -55,16 +55,16 @@ void lp_ribbon_upward(uint16_t wait, uint16_t rate, uint8_t fade)
|
||||
x = s[2]++;
|
||||
|
||||
// are we done?
|
||||
if (x > sizeof(led_set.ribbon)) {
|
||||
if (x >= sizeof(led_set.ribbon)) {
|
||||
s[0] = 0;
|
||||
s[1] = wait;
|
||||
break;
|
||||
}
|
||||
|
||||
// fade in and up
|
||||
led_set.ribbon[x] = 0x40;
|
||||
if (x) led_set.ribbon[x - 1] = 0x70;
|
||||
if (x > 1) led_set.ribbon[x - 2] = 0xff;
|
||||
led_set.ribbon[x] = 0x20;
|
||||
if (x) led_set.ribbon[x - 1] = 0x66;
|
||||
if (x > 1) led_set.ribbon[x - 2] = 0xd0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ void lp_ribbon_upward(uint16_t wait, uint16_t rate, uint8_t fade)
|
||||
if (led_set.ribbon[i] >= fade) {
|
||||
led_set.ribbon[i] -= fade;
|
||||
} else {
|
||||
led_set.ribbon[i] = 0;
|
||||
led_set.ribbon[i] >>= 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user