]> git.sur5r.net Git - freertos/blob - Demo/lwIP_AVR32_UC3/conf_eth.h
Add AVR32 port and demo files.
[freertos] / Demo / lwIP_AVR32_UC3 / conf_eth.h
1 /* This header file is part of the ATMEL FREERTOS-0.9.0 Release */\r
2 \r
3 /*This file is prepared for Doxygen automatic documentation generation.*/\r
4 /*! \file ******************************************************************\r
5  *\r
6  * \brief Ethernet module configuration file.\r
7  *\r
8  * This file contains the possible external configuration of the Ethernet module.\r
9  *\r
10  * - Compiler:           IAR EWAVR32 and GNU GCC for AVR32\r
11  * - Supported devices:  All AVR32 devices can be used.\r
12  * - AppNote:\r
13  *\r
14  * \author               Atmel Corporation: http://www.atmel.com \n\r
15  *                       Support email: avr32@atmel.com\r
16  *\r
17  ***************************************************************************/\r
18 \r
19 /* Copyright (c) 2007, Atmel Corporation All rights reserved.\r
20  *\r
21  * Redistribution and use in source and binary forms, with or without\r
22  * modification, are permitted provided that the following conditions are met:\r
23  *\r
24  * 1. Redistributions of source code must retain the above copyright notice,\r
25  * this list of conditions and the following disclaimer.\r
26  *\r
27  * 2. Redistributions in binary form must reproduce the above copyright notice,\r
28  * this list of conditions and the following disclaimer in the documentation\r
29  * and/or other materials provided with the distribution.\r
30  *\r
31  * 3. The name of ATMEL may not be used to endorse or promote products derived\r
32  * from this software without specific prior written permission.\r
33  *\r
34  * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
35  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
36  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
37  * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
38  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
39  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
40  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
41  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
42  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
43  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
44  */\r
45 \r
46 \r
47 #ifndef _CONF_ETH_H_\r
48 #define _CONF_ETH_H_\r
49 \r
50 /*! define stack size for WEB server task */\r
51 #define lwipBASIC_WEB_SERVER_STACK_SIZE   256\r
52 \r
53 /*! define stack size for TFTP server task */\r
54 #define lwipBASIC_TFTP_SERVER_STACK_SIZE  1024\r
55 \r
56 /*! define stack size for SMTP host task */\r
57 #define lwipBASIC_SMTP_HOST_STACK_SIZE    256\r
58 \r
59 /*! define stack size for lwIP task */\r
60 #define lwipINTERFACE_STACK_SIZE          512\r
61 \r
62 /*! define stack size for netif task */\r
63 #define netifINTERFACE_TASK_STACK_SIZE    256\r
64 \r
65 /*! define WEB server priority */\r
66 #define ethWEBSERVER_PRIORITY             ( tskIDLE_PRIORITY + 2 )\r
67 \r
68 /*! define TFTP server priority */\r
69 #define ethTFTPSERVER_PRIORITY            ( tskIDLE_PRIORITY + 3 )\r
70 \r
71 /*! define SMTP host priority */\r
72 #define ethSMTPHOST_PRIORITY              ( tskIDLE_PRIORITY + 5 )\r
73 \r
74 /*! define lwIP task priority */\r
75 #define lwipINTERFACE_TASK_PRIORITY       ( configMAX_PRIORITIES - 1 )\r
76 \r
77 /*! define netif task priority */\r
78 #define netifINTERFACE_TASK_PRIORITY      ( configMAX_PRIORITIES - 1 )\r
79 \r
80 /*! Number of threads that can be started with sys_thread_new() */\r
81 #define SYS_THREAD_MAX                      6\r
82 \r
83 /*! LED used by the ethernet task, toggled on each activation */\r
84 #define webCONN_LED                         7\r
85 \r
86 /*! Use Auto Negociation to get speed and duplex */\r
87 #define ETHERNET_CONF_AN_ENABLE                      1\r
88 \r
89 /*! Do not use auto cross capability */\r
90 #define ETHERNET_CONF_AUTO_CROSS_ENABLE              0\r
91 /*! use direct cable */\r
92 #define ETHERNET_CONF_CROSSED_LINK                   0\r
93 \r
94 \r
95 /* ethernet default parameters */\r
96 /*! MAC address definition.  The MAC address must be unique on the network. */\r
97 #define emacETHADDR0                        0x00\r
98 #define emacETHADDR1                        0x04\r
99 #define emacETHADDR2                        0x25\r
100 #define emacETHADDR3                        0x40\r
101 #define emacETHADDR4                        0x40\r
102 #define emacETHADDR5                        0x40\r
103 \r
104 #if 0\r
105 /*! The IP address being used. */\r
106 #define emacIPADDR0           10\r
107 #define emacIPADDR1           172\r
108 #define emacIPADDR2           214\r
109 #define emacIPADDR3           40\r
110 \r
111 /*! The gateway address being used. */\r
112 #define emacGATEWAY_ADDR0     10\r
113 #define emacGATEWAY_ADDR1     172\r
114 #define emacGATEWAY_ADDR2     250\r
115 #define emacGATEWAY_ADDR3     1\r
116 \r
117 /*! The network mask being used. */\r
118 #define emacNET_MASK0         255\r
119 #define emacNET_MASK1         255\r
120 #define emacNET_MASK2         0\r
121 #define emacNET_MASK3         0\r
122 \r
123 #else\r
124 /*! The IP address being used. */\r
125 #define emacIPADDR0                         192\r
126 #define emacIPADDR1                         168\r
127 #define emacIPADDR2                         0\r
128 #define emacIPADDR3                         2\r
129 \r
130 /*! The gateway address being used. */\r
131 #define emacGATEWAY_ADDR0                   192\r
132 #define emacGATEWAY_ADDR1                   168\r
133 #define emacGATEWAY_ADDR2                   0\r
134 #define emacGATEWAY_ADDR3                   1\r
135 \r
136 /*! The network mask being used. */\r
137 #define emacNET_MASK0                       255\r
138 #define emacNET_MASK1                       255\r
139 #define emacNET_MASK2                       255\r
140 #define emacNET_MASK3                       0\r
141 #endif\r
142 \r
143 #endif\r