#include <isa_bus.h>
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). |
|
data direction for address bus
Definition at line 34 of file isa_bus.h. Referenced by rtl8019read(), rtl8019SetupPorts(), and rtl8019write(). |
|
port pins used by address bus( 1 indicate that the pin is used)
Definition at line 36 of file isa_bus.h. Referenced by rtl8019read(), rtl8019SetupPorts(), and rtl8019write(). |
|
data port used for address bus
Definition at line 32 of file isa_bus.h. Referenced by rtl8019read(), and rtl8019write(). |
|
data direction for control bus
Definition at line 60 of file isa_bus.h. Referenced by rtl8019SetupPorts(). |
|
port pins used by control bus (1 indicate that the pin is used)
Definition at line 62 of file isa_bus.h. Referenced by rtl8019SetupPorts(). |
|
port used for control bus
Definition at line 58 of file isa_bus.h. Referenced by main(), rtl8019read(), rtl8019SetupPorts(), and rtl8019write(). |
|
data direction for data bus
Definition at line 45 of file isa_bus.h. Referenced by rtl8019SetupPorts(), and rtl8019write(). |
|
port pins used by data bus
Definition at line 51 of file isa_bus.h. Referenced by rtl8019SetupPorts(), and rtl8019write(). |
|
port used for data bus
Definition at line 42 of file isa_bus.h. Referenced by rtl8019SetupPorts(), and rtl8019write(). |
|
port used to read data
Definition at line 48 of file isa_bus.h. Referenced by rtl8019read(). |
|
Insert a nop.
|
|
port pin used by read line (1 indicate that the pin is used)
Definition at line 66 of file isa_bus.h. Referenced by rtl8019read(), and rtl8019SetupPorts(). |
|
port pin used by reset line (1 indicate that the pin is used)
Definition at line 64 of file isa_bus.h. Referenced by main(), and rtl8019SetupPorts(). |
|
Reset bit's positions that have 0 on mask.
Definition at line 92 of file isa_bus.h. Referenced by main(), rtl8019read(), rtl8019SetupPorts(), and rtl8019write(). |
|
Set bit's positions that have 1 on mask.
Definition at line 90 of file isa_bus.h. Referenced by main(), rtl8019read(), rtl8019SetupPorts(), and rtl8019write(). |
|
Value: Insert a delay ~= 125ns.
Definition at line 113 of file isa_bus.h. Referenced by rtl8019read(), and rtl8019write(). |
|
port pin used by write line (1 indicate that the pin is used)
Definition at line 68 of file isa_bus.h. Referenced by rtl8019SetupPorts(), and rtl8019write(). |
|
Value: 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.
Definition at line 100 of file isa_bus.h. Referenced by rtl8019read(), and rtl8019write(). |
|
Reads byte from RTL8019 register.
Definition at line 54 of file isa_bus.c. References ADDR_DDR, ADDR_PINS, ADDR_PORT, ASSERT, CNTRL_PORT, DATA_READ_L, READ_PIN, RstBits, SetBits, WaitState, and WritePort. |
|
Sets up the ports used for communication with the RTL8019 NIC (data bus, address bus, read, write, and reset).
Definition at line 84 of file isa_bus.c. References ADDR_DDR, ADDR_PINS, CNTRL_DDR, CNTRL_PINS, CNTRL_PORT, DATA_DDR_L, DATA_PINS_L, DATA_PORT_L, READ_PIN, RESET_PIN, RstBits, SetBits, and WRITE_PIN. Referenced by main(). |
|
Writes byte to RTL8019 register.
Definition at line 20 of file isa_bus.c. References ADDR_DDR, ADDR_PINS, ADDR_PORT, ASSERT, CNTRL_PORT, DATA_DDR_L, DATA_PINS_L, DATA_PORT_L, RstBits, SetBits, WaitState, WRITE_PIN, and WritePort. |