00001 /*! \file cs8900conf.h \brief Crystal CS8900 Ethernet Interface Driver Configuration. */ 00002 //***************************************************************************** 00003 // 00004 // File Name : 'cs8900conf.h' 00005 // Title : Crystal CS8900 Ethernet Interface Driver Configuration 00006 // Author : Pascal Stang 00007 // Created : 11/7/2004 00008 // Revised : 8/22/2005 00009 // Version : 0.1 00010 // Target MCU : Atmel AVR series 00011 // Editor Tabs : 4 00012 // 00013 /// \ingroup network 00014 // 00015 // Description : This driver provides initialization and transmit/receive 00016 // functions for the Crystal CS8900 10Mb Ethernet Controller and PHY. 00017 // 00018 //***************************************************************************** 00019 00020 #ifndef CS8900CONF_H 00021 #define CS8900CONF_H 00022 00023 // This driver supports a CS8900 connected in memory-mapped or direct I/O mode. 00024 // 00025 #define GENERAL_IO 0 00026 // Direct I/O mode assumes the NIC address, data, and control lines are 00027 // connected directly to processor I/O pins. The memory-bus accesses are 00028 // software emulated. 00029 // 00030 //#define MEMORY_MAPPED 1 (*** MEMORY-MAPPED NOT YET IMPLEMENTED ***) 00031 // Memory-mapped mode assumes that the NIC is connected the processor via 00032 // the external memory bus, and that the NIC address space starts at the 00033 // memory location CS8900_MEMORY_MAPPED_OFFSET. 00034 // 00035 // In either mode, a seperate I/O pins is required for control of the NIC's 00036 // hardware RESET line. 00037 00038 00039 // set the connection type used to communicate with the NIC 00040 #define NIC_CONNECTION GENERAL_IO 00041 00042 #if NIC_CONNECTION != GENERAL_IO 00043 // NIC is memory-mapped starting at this address 00044 #define CS8900_MEMORY_MAPPED_OFFSET 0x8000 00045 #else // NIC Interface through General I/O 00046 // CS8900 address port 00047 #define CS8900_ADDRESS_PORT PORTF 00048 #define CS8900_ADDRESS_DDR DDRF 00049 #define CS8900_ADDRESS_MASK 0x0F 00050 // CS8900 data port 00051 #define CS8900_DATA_PORT PORTA 00052 #define CS8900_DATA_DDR DDRA 00053 #define CS8900_DATA_PIN PINA 00054 // CS8900 control port 00055 #define CS8900_CONTROL_PORT PORTB 00056 #define CS8900_CONTROL_DDR DDRB 00057 #define CS8900_CONTROL_READPIN 4 00058 #define CS8900_CONTROL_WRITEPIN 3 00059 #endif 00060 00061 // CS8900 RESET pin 00062 #define CS8900_RESET_PORT PORTB 00063 #define CS8900_RESET_DDR DDRB 00064 #define CS8900_RESET_PIN 1 00065 00066 // MAC address for this interface 00067 #ifdef ETHADDR0 00068 #define CS8900_MAC0 ETHADDR0 00069 #define CS8900_MAC1 ETHADDR1 00070 #define CS8900_MAC2 ETHADDR2 00071 #define CS8900_MAC3 ETHADDR3 00072 #define CS8900_MAC4 ETHADDR4 00073 #define CS8900_MAC5 ETHADDR5 00074 #else 00075 #define CS8900_MAC0 '0' 00076 #define CS8900_MAC1 'F' 00077 #define CS8900_MAC2 'F' 00078 #define CS8900_MAC3 'I' 00079 #define CS8900_MAC4 'C' 00080 #define CS8900_MAC5 'E' 00081 #endif 00082 00083 #endif