Ethernetwebsoc

Dependencies:   C12832_lcd LM75B WebSocketClient mbed-rtos mbed Socket lwip-eth lwip-sys lwip

Committer:
GordonSin
Date:
Fri May 31 04:09:54 2013 +0000
Revision:
0:0ed2a7c7190c
31/5/2013;

Who changed what in which revision?

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