You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
1.6 KiB
92 lines
1.6 KiB
10 years ago
|
#pragma once
|
||
|
|
||
|
#include <avr/io.h>
|
||
|
|
||
|
#define D0 0
|
||
|
#define D1 1
|
||
|
#define D2 2
|
||
|
#define D3 3
|
||
|
#define D4 4
|
||
|
#define D5 5
|
||
|
#define D6 6
|
||
|
#define D7 7
|
||
|
#define D8 0
|
||
|
#define D9 1
|
||
|
#define D10 2
|
||
|
#define D11 3
|
||
|
#define D12 4
|
||
|
#define D13 5
|
||
|
#define A0 0
|
||
|
#define A1 1
|
||
|
#define A2 2
|
||
|
#define A3 3
|
||
|
#define A4 4
|
||
|
#define A5 5
|
||
|
|
||
|
// port definitions
|
||
|
#define PORT_D0 PORTD
|
||
|
#define PORT_D1 PORTD
|
||
|
#define PORT_D2 PORTD
|
||
|
#define PORT_D3 PORTD
|
||
|
#define PORT_D4 PORTD
|
||
|
#define PORT_D5 PORTD
|
||
|
#define PORT_D6 PORTD
|
||
|
#define PORT_D7 PORTD
|
||
|
#define PORT_D8 PORTB
|
||
|
#define PORT_D9 PORTB
|
||
|
#define PORT_D10 PORTB
|
||
|
#define PORT_D11 PORTB
|
||
|
#define PORT_D12 PORTB
|
||
|
#define PORT_D13 PORTB
|
||
|
#define PORT_A0 PORTC
|
||
|
#define PORT_A1 PORTC
|
||
|
#define PORT_A2 PORTC
|
||
|
#define PORT_A3 PORTC
|
||
|
#define PORT_A4 PORTC
|
||
|
#define PORT_A5 PORTC
|
||
|
|
||
|
#define PIN_D0 PIND
|
||
|
#define PIN_D1 PIND
|
||
|
#define PIN_D2 PIND
|
||
|
#define PIN_D3 PIND
|
||
|
#define PIN_D4 PIND
|
||
|
#define PIN_D5 PIND
|
||
|
#define PIN_D6 PIND
|
||
|
#define PIN_D7 PIND
|
||
|
#define PIN_D8 PINB
|
||
|
#define PIN_D9 PINB
|
||
|
#define PIN_D10 PINB
|
||
|
#define PIN_D11 PINB
|
||
|
#define PIN_D12 PINB
|
||
|
#define PIN_D13 PINB
|
||
|
#define PIN_A0 PINC
|
||
|
#define PIN_A1 PINC
|
||
|
#define PIN_A2 PINC
|
||
|
#define PIN_A3 PINC
|
||
|
#define PIN_A4 PINC
|
||
|
#define PIN_A5 PINC
|
||
|
|
||
|
#define DDR_D0 DDRD
|
||
|
#define DDR_D1 DDRD
|
||
|
#define DDR_D2 DDRD
|
||
|
#define DDR_D3 DDRD
|
||
|
#define DDR_D4 DDRD
|
||
|
#define DDR_D5 DDRD
|
||
|
#define DDR_D6 DDRD
|
||
|
#define DDR_D7 DDRD
|
||
|
#define DDR_D8 DDRB
|
||
|
#define DDR_D9 DDRB
|
||
|
#define DDR_D10 DDRB
|
||
|
#define DDR_D11 DDRB
|
||
|
#define DDR_D12 DDRB
|
||
|
#define DDR_D13 DDRB
|
||
|
#define DDR_A0 DDRC
|
||
|
#define DDR_A1 DDRC
|
||
|
#define DDR_A2 DDRC
|
||
|
#define DDR_A3 DDRC
|
||
|
#define DDR_A4 DDRC
|
||
|
#define DDR_A5 DDRC
|
||
|
|
||
|
#define OUT 1
|
||
|
#define IN 0
|