From: hackbard Date: Wed, 13 May 2009 22:31:57 +0000 (+0200) Subject: gio port init X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df18c58bb7a380fd036a88b23282eeb19a1c42a5;p=my-code%2Fatmel.git gio port init --- diff --git a/led_plex/main.asm b/led_plex/main.asm index cfa8c2e..3130055 100644 --- a/led_plex/main.asm +++ b/led_plex/main.asm @@ -31,10 +31,10 @@ reti reti ; T1 OVF1 -rjmp T1_OVF1 +rjmp T1_OVF ; T0 OVF0 -rjmp T0_OVF0 +rjmp T0_OVF ; UART RX rjmp UART_RX @@ -79,8 +79,8 @@ reti RESET: INIT: - ; port init - rcall PORT_INIT + ; gio port init + rcall GIO_PORT_INIT ; timer init rcall TIMER_INIT @@ -118,10 +118,10 @@ MAIN: ; interrupt routines ; -T1_OVF1: +T1_OVF: reti -T0_OVF0: +T0_OVF: reti UART_RX: diff --git a/led_plex/port.asm b/led_plex/port.asm new file mode 100644 index 0000000..aeb40f1 --- /dev/null +++ b/led_plex/port.asm @@ -0,0 +1,14 @@ +; port functions + +GIO_PORT_INIT: + + ; port b 0-2 -> output + ldi tmp1,0x06 + out DDRB,tmp1 + + ; zero outputs + ldi tmp1,0x00 + out PORTB,tmp1 + + ret +