isa_bus.h File Reference


Detailed Description

AVR Low Level Function - ISA Bus.

Author:
Ricardo Castro (sirpdc@gmail.com)

Definition in file isa_bus.h.

#include <avr/io.h>
#include "util.h"
#include "debug.h"

Go to the source code of this file.

Address Bus Configuration

#define ADDR_PORT   PORTA
 data port used for address bus
#define ADDR_DDR   DDRA
 data direction for address bus
#define ADDR_PINS   0b00011111
 port pins used by address bus( 1 indicate that the pin is used)

Data Bus Configuration

#define DATA_PORT_L   PORTC
 port used for data bus
#define DATA_DDR_L   DDRC
 data direction for data bus
#define DATA_READ_L   PINC
 port used to read data
#define DATA_PINS_L   0b11111111
 port pins used by data bus
(1 indicate that the pin is used)

Control Bus Configuration

#define CNTRL_PORT   PORTA
 port used for control bus
#define CNTRL_DDR   DDRA
 data direction for control bus
#define CNTRL_PINS   0b11100000
 port pins used by control bus (1 indicate that the pin is used)
#define RESET_PIN   0b10000000
 port pin used by reset line (1 indicate that the pin is used)
#define READ_PIN   0b00100000
 port pin used by read line (1 indicate that the pin is used)
#define WRITE_PIN   0b01000000
 port pin used by write line (1 indicate that the pin is used)

Defines

#define SetBits(_port_sss, _mask_sss)   _port_sss |= (_mask_sss)
 Set bit's positions that have 1 on mask.
#define RstBits(_port_sss, _mask_sss)   _port_sss &= (~ (_mask_sss) )
 Reset bit's positions that have 0 on mask.
#define WritePort(_port_sss, _mask_sss, _value_sss)
 Write a new value to port using mask:
1) put 0 on all the mask bits that are 0
2) put 1 on all the mask bits that are 1.
#define nop()   asm volatile("nop\n\t"::)
 Insert a nop.
#define WaitState()
 Insert a delay ~= 125ns.

Functions

void rtl8019write (unsigned char data, unsigned char address)
 Writes byte to RTL8019 register.
unsigned char rtl8019read (unsigned char address)
 Reads byte from RTL8019 register.
void rtl8019SetupPorts (void)
 Sets up the ports used for communication with the RTL8019 NIC (data bus, address bus, read, write, and reset).


Generated on Fri Jan 6 22:23:17 2006 for EtherProgs by  doxygen 1.4.5