KEIS

Dependents:   EthernetInterface_ccx

Fork of lwip-eth by mbed official

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers lpc_emac_config.h Source File

lpc_emac_config.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 * $Id$        lpc_emac_config.h            2011-11-20
00003 *//**
00004 * @file        lpc_emac_config.h
00005 * @brief    PHY and EMAC configuration file
00006 * @version    1.0
00007 * @date        20 Nov. 2011
00008 * @author    NXP MCU SW Application Team
00009 * 
00010 * Copyright(C) 2011, NXP Semiconductor
00011 * All rights reserved.
00012 *
00013 ***********************************************************************
00014 * Software that is described herein is for illustrative purposes only
00015 * which provides customers with programming information regarding the
00016 * products. This software is supplied "AS IS" without any warranties.
00017 * NXP Semiconductors assumes no responsibility or liability for the
00018 * use of the software, conveys no license or title under any patent,
00019 * copyright, or mask work right to the product. NXP Semiconductors
00020 * reserves the right to make changes in the software without
00021 * notification. NXP Semiconductors also make no representation or
00022 * warranty that such application will be suitable for the specified
00023 * use without further testing or modification.
00024 **********************************************************************/
00025 
00026 #ifndef __LPC_EMAC_CONFIG_H
00027 #define __LPC_EMAC_CONFIG_H
00028 
00029 #include "lwip/opt.h"
00030 
00031 #ifdef __cplusplus
00032 extern "C"
00033 {
00034 #endif
00035 
00036 /** @defgroup lwip_phy_config    LWIP PHY configuration
00037  * @ingroup lwip_phy
00038  *
00039  * Configuration options for the PHY connected to the LPC EMAC.
00040  * @{
00041  */
00042 
00043 /** \brief  The PHY address connected the to MII/RMII
00044  */
00045 #define LPC_PHYDEF_PHYADDR 1    /**< The PHY address on the PHY device. */
00046 
00047 /** \brief  Enable autonegotiation mode.
00048  *          If this is enabled, the PHY will attempt to auto-negotiate the
00049  *          best link mode if the PHY supports it. If this is not enabled,
00050  *          the PHY_USE_FULL_DUPLEX and PHY_USE_100MBS defines will be
00051  *          used to select the link mode. Note that auto-negotiation may
00052  *          take a few seconds to complete.
00053  */
00054 #define PHY_USE_AUTONEG 1 /**< Enables auto-negotiation mode. */
00055 
00056 /** \brief  Sets up the PHY interface to either full duplex operation or
00057  *          half duplex operation if PHY_USE_AUTONEG is not enabled.
00058  */
00059 #define PHY_USE_FULL_DUPLEX 1 /**< Sets duplex mode to full. */
00060 
00061 /** \brief  Sets up the PHY interface to either 100MBS operation or 10MBS
00062  *          operation if PHY_USE_AUTONEG is not enabled.
00063  */
00064 #define PHY_USE_100MBS 1 /**< Sets data rate to 100Mbps. */
00065 
00066 /**          
00067  * @}
00068  */
00069 
00070 /** @defgroup lwip_emac_config    LWIP EMAC configuration
00071  * @ingroup lwip_emac
00072  *
00073  * Configuration options for the LPC EMAC.
00074  * @{
00075  */
00076 
00077 /** \brief  Selects RMII or MII connection type in the EMAC peripheral
00078  */
00079 #define LPC_EMAC_RMII 1         /**< Use the RMII or MII driver variant .*/
00080 
00081 /** \brief  Defines the number of descriptors used for RX. This
00082  *          must be a minimum value of 2.
00083  */
00084 #define LPC_NUM_BUFF_RXDESCS 3
00085 
00086 /** \brief  Defines the number of descriptors used for TX. Must
00087  *          be a minimum value of 2.
00088  */
00089 #define LPC_NUM_BUFF_TXDESCS 3
00090 
00091 /** \brief  Set this define to 1 to enable bounce buffers for transmit pbufs
00092  *          that cannot be sent via the zero-copy method. Some chained pbufs
00093  *          may have a payload address that links to an area of memory that
00094  *          cannot be used for transmit DMA operations. If this define is
00095  *          set to 1, an extra check will be made with the pbufs. If a buffer
00096  *          is determined to be non-usable for zero-copy, a temporary bounce
00097  *          buffer will be created and used instead.
00098  */
00099 #define LPC_TX_PBUF_BOUNCE_EN 1
00100 
00101 /**          
00102  * @}
00103  */
00104 
00105 #ifdef __cplusplus
00106 }
00107 #endif
00108 
00109 #endif /* __LPC_EMAC_CONFIG_H */
00110 
00111 /* --------------------------------- End Of File ------------------------------ */