Counter

Dependencies:   EthernetInterface NTPClient SDFileSystem TextLCD WebSocketClient mbed-rtos mbed Socket lwip-eth lwip-sys lwip FATFileSystem

Committer:
Tuxitheone
Date:
Mon Feb 29 18:59:15 2016 +0000
Revision:
0:ecaf3e593122
TankCounter

Who changed what in which revision?

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