LwIP with PPP & Ethernet integration

Dependents:   NetworkingCoreLib

This is the mbed port of the LwIP stack: http://savannah.nongnu.org/projects/lwip/

It includes contributed content from NXP's port for LPCxxxx devices: http://www.lpcware.com/content/project/lightweight-ip-lwip-networking-stack

Licence

LwIP is licenced under the BSD licence:

Copyright (c) 2001-2004 Swedish Institute of Computer Science. 
All rights reserved. 
Redistribution and use in source and binary forms, with or without modification, 
are permitted provided that the following conditions are met: 
1. Redistributions of source code must retain the above copyright notice, 
this list of conditions and the following disclaimer. 
2. Redistributions in binary form must reproduce the above copyright notice, 
this list of conditions and the following disclaimer in the documentation 
and/or other materials provided with the distribution. 
3. The name of the author may not be used to endorse or promote products 
derived from this software without specific prior written permission. 
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
OF SUCH DAMAGE.
Committer:
donatien
Date:
Fri May 25 08:56:35 2012 +0000
Revision:
2:1a87f74b8e3b
Parent:
0:8e01dca41002
Removed compilation of EMAC driver when using PPP

Who changed what in which revision?

UserRevisionLine numberNew contents of line
donatien 0:8e01dca41002 1 /**********************************************************************
donatien 0:8e01dca41002 2 * $Id$ lpc_emac_config.h 2011-11-20
donatien 0:8e01dca41002 3 *//**
donatien 0:8e01dca41002 4 * @file lpc_emac_config.h
donatien 0:8e01dca41002 5 * @brief PHY and EMAC configuration file
donatien 0:8e01dca41002 6 * @version 1.0
donatien 0:8e01dca41002 7 * @date 20 Nov. 2011
donatien 0:8e01dca41002 8 * @author NXP MCU SW Application Team
donatien 0:8e01dca41002 9 *
donatien 0:8e01dca41002 10 * Copyright(C) 2011, NXP Semiconductor
donatien 0:8e01dca41002 11 * All rights reserved.
donatien 0:8e01dca41002 12 *
donatien 0:8e01dca41002 13 ***********************************************************************
donatien 0:8e01dca41002 14 * Software that is described herein is for illustrative purposes only
donatien 0:8e01dca41002 15 * which provides customers with programming information regarding the
donatien 0:8e01dca41002 16 * products. This software is supplied "AS IS" without any warranties.
donatien 0:8e01dca41002 17 * NXP Semiconductors assumes no responsibility or liability for the
donatien 0:8e01dca41002 18 * use of the software, conveys no license or title under any patent,
donatien 0:8e01dca41002 19 * copyright, or mask work right to the product. NXP Semiconductors
donatien 0:8e01dca41002 20 * reserves the right to make changes in the software without
donatien 0:8e01dca41002 21 * notification. NXP Semiconductors also make no representation or
donatien 0:8e01dca41002 22 * warranty that such application will be suitable for the specified
donatien 0:8e01dca41002 23 * use without further testing or modification.
donatien 0:8e01dca41002 24 **********************************************************************/
donatien 0:8e01dca41002 25
donatien 0:8e01dca41002 26 #ifndef __LPC_EMAC_CONFIG_H
donatien 0:8e01dca41002 27 #define __LPC_EMAC_CONFIG_H
donatien 0:8e01dca41002 28
donatien 0:8e01dca41002 29 #include "lwip/opt.h"
donatien 0:8e01dca41002 30
donatien 0:8e01dca41002 31 #ifdef __cplusplus
donatien 0:8e01dca41002 32 extern "C"
donatien 0:8e01dca41002 33 {
donatien 0:8e01dca41002 34 #endif
donatien 0:8e01dca41002 35
donatien 0:8e01dca41002 36 /** @defgroup lwip_phy_config LWIP PHY configuration
donatien 0:8e01dca41002 37 * @ingroup lwip_phy
donatien 0:8e01dca41002 38 *
donatien 0:8e01dca41002 39 * Configuration options for the PHY connected to the LPC EMAC.
donatien 0:8e01dca41002 40 * @{
donatien 0:8e01dca41002 41 */
donatien 0:8e01dca41002 42
donatien 0:8e01dca41002 43 /** \brief The PHY address connected the to MII/RMII
donatien 0:8e01dca41002 44 */
donatien 0:8e01dca41002 45 #define LPC_PHYDEF_PHYADDR 1 /**< The PHY address on the PHY device. */
donatien 0:8e01dca41002 46
donatien 0:8e01dca41002 47 /** \brief Enable autonegotiation mode.
donatien 0:8e01dca41002 48 * If this is enabled, the PHY will attempt to auto-negotiate the
donatien 0:8e01dca41002 49 * best link mode if the PHY supports it. If this is not enabled,
donatien 0:8e01dca41002 50 * the PHY_USE_FULL_DUPLEX and PHY_USE_100MBS defines will be
donatien 0:8e01dca41002 51 * used to select the link mode. Note that auto-negotiation may
donatien 0:8e01dca41002 52 * take a few seconds to complete.
donatien 0:8e01dca41002 53 */
donatien 0:8e01dca41002 54 #define PHY_USE_AUTONEG 1 /**< Enables auto-negotiation mode. */
donatien 0:8e01dca41002 55
donatien 0:8e01dca41002 56 /** \brief Sets up the PHY interface to either full duplex operation or
donatien 0:8e01dca41002 57 * half duplex operation if PHY_USE_AUTONEG is not enabled.
donatien 0:8e01dca41002 58 */
donatien 0:8e01dca41002 59 #define PHY_USE_FULL_DUPLEX 1 /**< Sets duplex mode to full. */
donatien 0:8e01dca41002 60
donatien 0:8e01dca41002 61 /** \brief Sets up the PHY interface to either 100MBS operation or 10MBS
donatien 0:8e01dca41002 62 * operation if PHY_USE_AUTONEG is not enabled.
donatien 0:8e01dca41002 63 */
donatien 0:8e01dca41002 64 #define PHY_USE_100MBS 1 /**< Sets data rate to 100Mbps. */
donatien 0:8e01dca41002 65
donatien 0:8e01dca41002 66 /**
donatien 0:8e01dca41002 67 * @}
donatien 0:8e01dca41002 68 */
donatien 0:8e01dca41002 69
donatien 0:8e01dca41002 70 /** @defgroup lwip_emac_config LWIP EMAC configuration
donatien 0:8e01dca41002 71 * @ingroup lwip_emac
donatien 0:8e01dca41002 72 *
donatien 0:8e01dca41002 73 * Configuration options for the LPC EMAC.
donatien 0:8e01dca41002 74 * @{
donatien 0:8e01dca41002 75 */
donatien 0:8e01dca41002 76
donatien 0:8e01dca41002 77 /** \brief Selects RMII or MII connection type in the EMAC peripheral
donatien 0:8e01dca41002 78 */
donatien 0:8e01dca41002 79 #define LPC_EMAC_RMII 1 /**< Use the RMII or MII driver variant .*/
donatien 0:8e01dca41002 80
donatien 0:8e01dca41002 81 /** \brief Defines the number of descriptors used for RX. This
donatien 0:8e01dca41002 82 * must be a minimum value of 2.
donatien 0:8e01dca41002 83 */
donatien 0:8e01dca41002 84 #define LPC_NUM_BUFF_RXDESCS 3
donatien 0:8e01dca41002 85
donatien 0:8e01dca41002 86 /** \brief Defines the number of descriptors used for TX. Must
donatien 0:8e01dca41002 87 * be a minimum value of 2.
donatien 0:8e01dca41002 88 */
donatien 0:8e01dca41002 89 #define LPC_NUM_BUFF_TXDESCS 2
donatien 0:8e01dca41002 90
donatien 0:8e01dca41002 91 /** \brief Set this define to 1 to enable bounce buffers for transmit pbufs
donatien 0:8e01dca41002 92 * that cannot be sent via the zero-copy method. Some chained pbufs
donatien 0:8e01dca41002 93 * may have a payload address that links to an area of memory that
donatien 0:8e01dca41002 94 * cannot be used for transmit DMA operations. If this define is
donatien 0:8e01dca41002 95 * set to 1, an extra check will be made with the pbufs. If a buffer
donatien 0:8e01dca41002 96 * is determined to be non-usable for zero-copy, a temporary bounce
donatien 0:8e01dca41002 97 * buffer will be created and used instead.
donatien 0:8e01dca41002 98 */
donatien 0:8e01dca41002 99 #define LPC_TX_PBUF_BOUNCE_EN 1
donatien 0:8e01dca41002 100
donatien 0:8e01dca41002 101 /**
donatien 0:8e01dca41002 102 * @}
donatien 0:8e01dca41002 103 */
donatien 0:8e01dca41002 104
donatien 0:8e01dca41002 105 #ifdef __cplusplus
donatien 0:8e01dca41002 106 }
donatien 0:8e01dca41002 107 #endif
donatien 0:8e01dca41002 108
donatien 0:8e01dca41002 109 #endif /* __LPC_EMAC_CONFIG_H */
donatien 0:8e01dca41002 110
donatien 0:8e01dca41002 111 /* --------------------------------- End Of File ------------------------------ */