KEIS

Dependents:   EthernetInterface_t

Fork of lwip-eth by mbed official

Committer:
emilmont
Date:
Mon Jul 23 11:52:41 2012 +0000
Revision:
3:dd8b8f5b449a
Parent:
1:0c9d93e2f51c
Child:
4:d827a085afd9
tidyup

Who changed what in which revision?

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