KEIS

Fork of lwip-eth by mbed official

Committer:
emilmont
Date:
Fri Jun 22 11:17:21 2012 +0000
Revision:
1:0c9d93e2f51c
Parent:
0:f4db29eb9e47
Child:
3:dd8b8f5b449a
Adapt NXP lwip Ethernet driver to CMSIS-RTOS and LPC1768

Who changed what in which revision?

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