fixed led flashing in programming mode being fucked
don't write code when sleep deprived you make stupid mistakes
This commit is contained in:
parent
3eb211fb54
commit
218819f75f
|
@ -59,10 +59,12 @@ void gpio_init()
|
|||
// lightsense LED cathode
|
||||
gpio.GPIO_Mode = GPIO_Mode_Out_PP;
|
||||
gpio.GPIO_Pin = GPIO_Pin_2;
|
||||
GPIOA->OUTDR = ~GPIO_Pin_2;
|
||||
GPIO_Init(GPIOA, &gpio);
|
||||
|
||||
// lightsense LED anode
|
||||
gpio.GPIO_Pin = GPIO_Pin_0;
|
||||
GPIOD->OUTDR = ~GPIO_Pin_0;
|
||||
GPIO_Init(GPIOD, &gpio);
|
||||
|
||||
// unused pins
|
||||
|
|
|
@ -529,7 +529,7 @@ void ui_render()
|
|||
config_save_timer = UI_CONF_SAVE_TIMEOUT;
|
||||
|
||||
// rapidly flash lsens
|
||||
if ((tick >> 3) & 1) {
|
||||
if ((tick & 0x7) == 0) {
|
||||
GPIOD->OUTDR ^= GPIO_Pin_0;
|
||||
}
|
||||
|
||||
|
@ -573,7 +573,7 @@ void ui_render()
|
|||
config_save_timer = UI_CONF_SAVE_TIMEOUT;
|
||||
|
||||
// slowly flash lsnes
|
||||
if ((tick >> 5) & 1) {
|
||||
if ((tick & 0x20) == 0) {
|
||||
GPIOD->OUTDR ^= GPIO_Pin_0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue