Skip to content

Commit

Permalink
workshop nik: small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
schneider42 committed Aug 13, 2011
1 parent c974cfc commit d9761c9
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions firmware/l0dable/nick_work.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,27 +215,27 @@ static void tick_lilakit(void)

if (lk_ticks % 10 == 0) {
lkReadI2C();
}

if ((lk_in0 & 0x02) == 0 && lk_button_mode == 0) {
melody_index = 0;
melody_timeout = 0;

lk_ticks = 0;
lk_button_mode = 1;
lk_ls1 = 0;
lk_ls1 |= LK_I2C_LS_ON << 4;
lk_ls1 |= LK_I2C_LS_ON << 6;
lkUpdateI2C();
}
if ((lk_in0 & 0x02) == 0 && lk_button_mode == 0) {
melody_index = 0;
melody_timeout = 0;

lk_ticks = 0;
lk_button_mode = 1;
lk_ls1 = 0;
lk_ls1 |= LK_I2C_LS_ON << 4;
lk_ls1 |= LK_I2C_LS_ON << 6;
lkUpdateI2C();
}

if (lk_button_mode == 1 && lk_ticks > 0xFF) {
lk_button_mode = 0;
lk_ls1 = 0;
lk_ls1 |= LK_I2C_LS_PWM0 << 4;
lk_ls1 |= LK_I2C_LS_PWM1 << 6;
lkUpdateI2C();
if (lk_button_mode == 1 && lk_ticks > 0xFF) {
lk_button_mode = 0;
lk_ls1 = 0;
lk_ls1 |= LK_I2C_LS_PWM0 << 4;
lk_ls1 |= LK_I2C_LS_PWM1 << 6;
lkUpdateI2C();
}
}

}
Expand Down

0 comments on commit d9761c9

Please sign in to comment.