void init_buttons()
{
- DDRB &= ~(_BV(PB6) | _BV(PB0));
- PORTB |= _BV(PB6) | _BV(PB0);
+ DDRB &= ~(_BV(PB4) | _BV(PB6));
+ PORTB |= _BV(PB4) | _BV(PB6);
sleep_after_release = 0;
// log_byte(PORTB);
unsigned char i;
unsigned char port_states[N_BUTTONS] = {
pinb & _BV(PB6),
- pinb & _BV(PB0),
+ pinb & _BV(PB4),
};
for (i = 0; i < N_BUTTONS; i++) {
if (!port_states[i]) { // is pressed