1 /*This file is prepared for Doxygen automatic documentation generation.*/
\r
2 /*! \file ******************************************************************
\r
4 * \brief Ethernet module configuration file.
\r
6 * This file contains the possible external configuration of the Ethernet module.
\r
8 * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
\r
9 * - Supported devices: All AVR32 devices can be used.
\r
12 * \author Atmel Corporation: http://www.atmel.com \n
\r
13 * Support and FAQ: http://support.atmel.no/
\r
15 ***************************************************************************/
\r
17 /* Copyright (c) 2007, Atmel Corporation All rights reserved.
\r
19 * Redistribution and use in source and binary forms, with or without
\r
20 * modification, are permitted provided that the following conditions are met:
\r
22 * 1. Redistributions of source code must retain the above copyright notice,
\r
23 * this list of conditions and the following disclaimer.
\r
25 * 2. Redistributions in binary form must reproduce the above copyright notice,
\r
26 * this list of conditions and the following disclaimer in the documentation
\r
27 * and/or other materials provided with the distribution.
\r
29 * 3. The name of ATMEL may not be used to endorse or promote products derived
\r
30 * from this software without specific prior written permission.
\r
32 * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
\r
33 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
\r
34 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
\r
35 * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
\r
36 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
\r
37 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
\r
38 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
\r
39 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
\r
40 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
\r
41 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
45 #ifndef _CONF_ETH_H_
\r
46 #define _CONF_ETH_H_
\r
48 /*! define stack size for WEB server task */
\r
49 #define lwipBASIC_WEB_SERVER_STACK_SIZE 256
\r
51 /*! define stack size for TFTP server task */
\r
52 #define lwipBASIC_TFTP_SERVER_STACK_SIZE 1024
\r
54 /*! define stack size for SMTP Client task */
\r
55 #define lwipBASIC_SMTP_CLIENT_STACK_SIZE 256
\r
57 /*! define stack size for lwIP task */
\r
58 #define lwipINTERFACE_STACK_SIZE 512
\r
60 /*! define stack size for netif task */
\r
61 #define netifINTERFACE_TASK_STACK_SIZE 256
\r
63 /*! define WEB server priority */
\r
64 #define ethWEBSERVER_PRIORITY ( tskIDLE_PRIORITY + 2 )
\r
66 /*! define TFTP server priority */
\r
67 #define ethTFTPSERVER_PRIORITY ( tskIDLE_PRIORITY + 3 )
\r
69 /*! define SMTP Client priority */
\r
70 #define ethSMTPCLIENT_PRIORITY ( tskIDLE_PRIORITY + 5 )
\r
72 /*! define lwIP task priority */
\r
73 #define lwipINTERFACE_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
\r
75 /*! define netif task priority */
\r
76 #define netifINTERFACE_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
\r
78 /*! Number of threads that can be started with sys_thread_new() */
\r
79 #define SYS_THREAD_MAX 6
\r
81 /*! LED used by the ethernet task, toggled on each activation */
\r
82 #define webCONN_LED 7
\r
84 /*! Phy Address (set through strap options) */
\r
85 #define ETHERNET_CONF_PHY_ADDR 0x01
\r
86 #define ETHERNET_CONF_PHY_ID 0x20005C90
\r
88 /*! Number of receive buffers */
\r
89 #define ETHERNET_CONF_NB_RX_BUFFERS 20
\r
91 /*! USE_RMII_INTERFACE must be defined as 1 to use an RMII interface, or 0
\r
92 to use an MII interface. */
\r
93 #define ETHERNET_CONF_USE_RMII_INTERFACE 1
\r
95 /*! Number of Transmit buffers */
\r
96 #define ETHERNET_CONF_NB_TX_BUFFERS 10
\r
98 /*! Size of each Transmit buffer. */
\r
99 #define ETHERNET_CONF_TX_BUFFER_SIZE 512
\r
101 /*! Clock definition */
\r
102 #define ETHERNET_CONF_SYSTEM_CLOCK 48000000
\r
104 /*! Use Auto Negociation to get speed and duplex */
\r
105 #define ETHERNET_CONF_AN_ENABLE 1
\r
107 /*! Do not use auto cross capability */
\r
108 #define ETHERNET_CONF_AUTO_CROSS_ENABLE 0
\r
109 /*! use direct cable */
\r
110 #define ETHERNET_CONF_CROSSED_LINK 0
\r
113 /* ethernet default parameters */
\r
114 /*! MAC address definition. The MAC address must be unique on the network. */
\r
115 #define ETHERNET_CONF_ETHADDR0 0x00
\r
116 #define ETHERNET_CONF_ETHADDR1 0x04
\r
117 #define ETHERNET_CONF_ETHADDR2 0x25
\r
118 #define ETHERNET_CONF_ETHADDR3 0x40
\r
119 #define ETHERNET_CONF_ETHADDR4 0x40
\r
120 #define ETHERNET_CONF_ETHADDR5 0x40
\r
122 /*! The IP address being used. */
\r
123 #define ETHERNET_CONF_IPADDR0 192
\r
124 #define ETHERNET_CONF_IPADDR1 168
\r
125 #define ETHERNET_CONF_IPADDR2 0
\r
126 #define ETHERNET_CONF_IPADDR3 2
\r
128 /*! The gateway address being used. */
\r
129 #define ETHERNET_CONF_GATEWAY_ADDR0 192
\r
130 #define ETHERNET_CONF_GATEWAY_ADDR1 168
\r
131 #define ETHERNET_CONF_GATEWAY_ADDR2 0
\r
132 #define ETHERNET_CONF_GATEWAY_ADDR3 1
\r
134 /*! The network mask being used. */
\r
135 #define ETHERNET_CONF_NET_MASK0 255
\r
136 #define ETHERNET_CONF_NET_MASK1 255
\r
137 #define ETHERNET_CONF_NET_MASK2 255
\r
138 #define ETHERNET_CONF_NET_MASK3 0
\r