ioconfig.h File Reference

I/O port definitions. More...

#include <avr/io.h>

Include dependency graph for ioconfig.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define PS2PORT   PORTD
 PS2 port.
#define PS2PIN   PIND
 PS2 input.
#define PS2DDR   DDRD
 PS2 data direction.
#define PS2CLK   2
 PS2CLK is pin 2.
#define PS2DAT   4
 PS2DAT is pin 4.
#define PS2_RXBUF_LEN   16
 PS2 receive buffer size.
#define SENSEPORT   PORTD
 SID sense port.
#define SENSEDDR   DDRD
 SID sense data direction.
#define SENSEPIN   PIND
 SID sense input.
#define POTSENSE   3
 INT1 attached to PORTD.3,.
#define POTPORT   PORTB
 POT-controlling outputs X and Y.
#define POTDDR   DDRB
 POT outputs data direction.
#define POTPIN   PINB
 POT outputs input ;).
#define POTY   1
 Y-line, also OC1A.
#define POTX   2
 X-line, also OC1B, also right button in joystick mode.
#define JOYPORT   PORTC
 Joystick pins.
#define JOYDDR   DDRC
 Joystick pins data direction (out = switch closed to gnd).
#define JOYPIN   PINC
 Joystick in.
#define JOYUP   0
 Joystick UP switch.
#define JOYDOWN   2
 Joystick DOWN switch.
#define JOYLEFT   3
 Joystick LEFT switch.
#define JOYRIGHT   4
 Joystick RIGHT switch.
#define JOYFIRE   1
 Joystick FIRE switch.

Functions

void io_init ()


Detailed Description

I/O port definitions.


Define Documentation

#define JOYDDR   DDRC

Joystick pins data direction (out = switch closed to gnd).

#define JOYDOWN   2

Joystick DOWN switch.

#define JOYFIRE   1

Joystick FIRE switch.

#define JOYLEFT   3

Joystick LEFT switch.

#define JOYPIN   PINC

Joystick in.

#define JOYPORT   PORTC

Joystick pins.

#define JOYRIGHT   4

Joystick RIGHT switch.

#define JOYUP   0

Joystick UP switch.

#define POTDDR   DDRB

POT outputs data direction.

#define POTPIN   PINB

POT outputs input ;).

#define POTPORT   PORTB

POT-controlling outputs X and Y.

#define POTSENSE   3

INT1 attached to PORTD.3,.

#define POTX   2

X-line, also OC1B, also right button in joystick mode.

#define POTY   1

Y-line, also OC1A.

#define PS2_RXBUF_LEN   16

PS2 receive buffer size.

#define PS2CLK   2

PS2CLK is pin 2.

#define PS2DAT   4

PS2DAT is pin 4.

#define PS2DDR   DDRD

PS2 data direction.

#define PS2PIN   PIND

PS2 input.

#define PS2PORT   PORTD

PS2 port.

#define SENSEDDR   DDRD

SID sense data direction.

#define SENSEPIN   PIND

SID sense input.

#define SENSEPORT   PORTD

SID sense port.


Function Documentation

void io_init (  ) 

00003                {
00004     // configure PS2 lines as inputs by default, internal pullups off
00005     PS2PORT &= ~(_BV(PS2CLK)|_BV(PS2DAT));  
00006     PS2DDR &= ~(_BV(PS2CLK)|_BV(PS2DAT));    
00007 }


Generated on Fri Nov 13 04:21:21 2009 for [M]ouse by  doxygen 1.5.9