- Main Page
- Data Structures
- Files

# conf_eth.h

Go to the documentation of this file.

    00001 /*This file is prepared for Doxygen automatic documentation generation.*/
    00017 /* Copyright (c) 2009 Atmel Corporation. All rights reserved.
    00018  *
    00019  * Redistribution and use in source and binary forms, with or without
    00020  * modification, are permitted provided that the following conditions are met:
    00021  *
    00022  * 1. Redistributions of source code must retain the above copyright notice, this
    00023  * list of conditions and the following disclaimer.
    00024  *
    00025  * 2. Redistributions in binary form must reproduce the above copyright notice,
    00026  * this list of conditions and the following disclaimer in the documentation
    00027  * and/or other materials provided with the distribution.
    00028  *
    00029  * 3. The name of Atmel may not be used to endorse or promote products derived
    00030  * from this software without specific prior written permission.
    00031  *
    00032  * 4. This software may only be redistributed and used in connection with an Atmel
    00033  * AVR product.
    00034  *
    00035  * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
    00036  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    00037  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
    00038  * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
    00039  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    00040  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    00041  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    00042  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    00043  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    00044  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
    00045  *
    00046  */
    00047
    00048 #ifndef _CONF_ETH_H_
    00049 #define _CONF_ETH_H_
    00050
    00051 #include "lwipopts.h"
    00052
    00054 #define ETHERNET_CONF_PHY_ADDR             0x01
    00055 #define ETHERNET_CONF_PHY_ID               0x20005C90
    00056
    00060 #define ETHERNET_CONF_NB_RX_BUFFERS        24
    00061
    00064 #define ETHERNET_CONF_USE_RMII_INTERFACE   1
    00065
    00067 #define ETHERNET_CONF_NB_TX_BUFFERS        10
    00068
    00070 #define ETHERNET_CONF_TX_BUFFER_SIZE       512
    00071
    00073 #define ETHERNET_CONF_SYSTEM_CLOCK         48000000
    00074
    00076 #define ETHERNET_CONF_AN_ENABLE                      1
    00077
    00079 #define ETHERNET_CONF_AUTO_CROSS_ENABLE              1
    00080
    00082 #define ETHERNET_CONF_CROSSED_LINK                   0
    00083
    00084
    00085 /* ethernet default parameters */
    00087 #define ETHERNET_CONF_ETHADDR0                        0x00
    00088 #define ETHERNET_CONF_ETHADDR1                        0x04
    00089 #define ETHERNET_CONF_ETHADDR2                        0x25
    00090 #define ETHERNET_CONF_ETHADDR3                        0x40
    00091 #define ETHERNET_CONF_ETHADDR4                        0x40
    00092 #define ETHERNET_CONF_ETHADDR5                        0x40
    00093
    00094 //#define ETHERNET_CONF_ETHADDR0                        0x00
    00095 //#define ETHERNET_CONF_ETHADDR1                        0x14
    00096 //#define ETHERNET_CONF_ETHADDR2                        0x22
    00097 //#define ETHERNET_CONF_ETHADDR3                        0xBE
    00098 //#define ETHERNET_CONF_ETHADDR4                        0x17
    00099 //#define ETHERNET_CONF_ETHADDR5                        0xEF
    00100
    00102 #define ETHERNET_CONF_IPADDR0                         192
    00103 #define ETHERNET_CONF_IPADDR1                         168
    00104 #define ETHERNET_CONF_IPADDR2                         0
    00105 #define ETHERNET_CONF_IPADDR3                         2
    00106
    00108 #define ETHERNET_CONF_GATEWAY_ADDR0                   192
    00109 #define ETHERNET_CONF_GATEWAY_ADDR1                   168
    00110 #define ETHERNET_CONF_GATEWAY_ADDR2                   0
    00111 #define ETHERNET_CONF_GATEWAY_ADDR3                   1
    00112
    00114 #define ETHERNET_CONF_NET_MASK0                       255
    00115 #define ETHERNET_CONF_NET_MASK1                       255
    00116 #define ETHERNET_CONF_NET_MASK2                       255
    00117 #define ETHERNET_CONF_NET_MASK3                       0
    00118
    00120 #define SSL_SERVER_PORT 4433
    00121
    00122 #if (LWIP_DHCP==1)
    00123 // Default this must be server address
    00124 #error "Please, sets the server address using define SSL_SERVER_NAME, and remove this #error"
    00125 #define SSL_SERVER_NAME "192.168.0.1"
    00126 #else
    00127 // Default server address when DHCP is disable
    00128 #define SSL_SERVER_NAME "192.168.0.1"
    00129 #endif
    00130
    00131 // This is used if DNS is enbale
    00132 #define DNS_SERVER_NAME "yourdnsdomain.com"
    00133
    00134 #endif