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