From: Jan "Yenya" Kasprzak Date: Fri, 14 Sep 2012 21:01:20 +0000 (+0200) Subject: buttons according to pins.txt X-Git-Tag: gerber-fab-20121029-1711~36 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=2a206315ac194c21e3a14ca0b3a9e29cd0cec0b2;p=bike-lights.git buttons according to pins.txt --- diff --git a/firmware/buttons.c b/firmware/buttons.c index d5a18be..84dd8da 100644 --- a/firmware/buttons.c +++ b/firmware/buttons.c @@ -11,8 +11,8 @@ static unsigned char sleep_after_release; 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); @@ -56,7 +56,7 @@ void timer_check_buttons() 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