From 7072c3448916d4eb9e31b48a398bb3ccdb683df1 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Sun, 16 Mar 2014 15:38:04 +0100 Subject: request controller button state --- main.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index a067777..481757b 100644 --- a/main.c +++ b/main.c @@ -31,17 +31,40 @@ int main (void) while(1) { temp++; - PORTB=temp; + PORTB=~(1 << ((temp>>9)%6)); _delay_ms(1); asm volatile( BIT0 + BIT1 + BIT0 + BIT0 + + BIT0 + BIT0 BIT0 + BIT0 + BIT0 BIT0 BIT0 BIT0 + BIT0 BIT0 + BIT1 + BIT1 + + BIT0 + BIT0 + BIT0 + BIT0 + + BIT0 + BIT0 + BIT1 + BIT0 + + BIT1 "rjmp done \n" "loop:\n" -- cgit v1.2.3