⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 net_bsp.h

📁 ucos
💻 H
字号:
/*
*********************************************************************************************************
*                                              uC/TCP-IP
*                                      The Embedded TCP/IP Suite
*
*                          (c) Copyright 2003-2005; Micrium, Inc.; Weston, FL
*
*                   All rights reserved.  Protected by international copyright laws.
*                   Knowledge of the source code may not be used to write a similar
*                   product.  This file may only be used in accordance with a license
*                   and should not be redistributed in any way.
*********************************************************************************************************
*/

/*
*********************************************************************************************************
*
*                                NET BOARD SUPPORT PACKAGE (BSP) FUNCTIONS
*
*                                          ATMEL AT91SAM7X256 EMAC
*
* Filename      : net_bsp.h
* Programmer(s) : Eric Shufro
* Version       : 2.0
* Date          : 04/11/2006
*********************************************************************************************************
*/

#ifndef _NET_BSP_H
#define _NET_BSP_H


/*
*********************************************************************************************************
*                                               EXTERNS
*********************************************************************************************************
*/

#ifdef     NET_BSP_MODULE
#define    NET_BSP_EXT
#else
#define    NET_BSP_EXT  extern
#endif


/*$PAGE*/
/*
*********************************************************************************************************
*                                               DEFINES
*********************************************************************************************************
*/
                                                                        /* ----------- AT91SAM7X256 EMAC RX BUFFERS ----------                      */
#define  NIC_RX_BUF_SIZE                                 128            /* Set equal to 128 bytes each since thats what the SAM7X256 supports       */
#define  NIC_RX_N_BUFS                                    24            /* Number of RX descriptors AND buffers.                                    */

                                                                        /* Configure MAC address set method :                                       */
#define  EMAC_CFG_MAC_ADDR_SEL         EMAC_CFG_MAC_ADDR_SEL_CFG
                                                                        /* EMAC_CFG_MAC_ADDR_SEL_EEPROM from NIC's EEPROM                           */
                                                                        /* EMAC_CFG_MAC_ADDR_SEL_CFG    from application                            */

/*
*********************************************************************************************************
*                                             DATA TYPES
*********************************************************************************************************
*/


/*
*********************************************************************************************************
*                                          GLOBAL VARIABLES
*********************************************************************************************************
*/


/*
*********************************************************************************************************
*                                              MACRO'S
*
* Note(s) : (1) When NET_NIC_CFG_RD_WR_SEL configured to NET_NIC_RD_WR_SEL_MACRO, implement NIC read/write
*               functionality with macro's.
*
*               (a) The developer MUST implement the NIC read/write macro functions with the correct number
*                   & type of arguments necessary to implement the NIC's read/write functionality.
*
*               (b) The developer SHOULD appropriately name the NIC read/write macro functions by appending
*                   the number of bits that the macro functions read/write to the end of the macro function
*                   name :
*
*                           NetNIC_Rd_xx()
*                           NetNIC_Wr_xx()
*
*                   For example, 16-bit read/write macro functions should be named :
*
*                           NetNIC_Rd_16()
*                           NetNIC_Wr_16()
*
*
*               See also 'net_bsp.c  NetNIC_Rd_xx()  Note #1'
*                      & 'net_bsp.c  NetNIC_Wr_xx()  Note #1'.
*********************************************************************************************************
*/

#if (NET_NIC_CFG_RD_WR_SEL != NET_NIC_RD_WR_SEL_FNCT)

#define  NetNIC_Rd_xx(...)

#define  NetNIC_Wr_xx(..., val)

#endif


/*
*********************************************************************************************************
*                                         FUNCTION PROTOTYPES
*********************************************************************************************************
*/

void  NetBSP_Phy_HW_Init(void);
void  NetBSP_EMAC_Settings_Update(CPU_INT32U speed, CPU_INT32U duplex);
void  NetBSP_NIC_PhyRdWrDly(void);

/*
*********************************************************************************************************
*                                        CONFIGURATION ERRORS
*********************************************************************************************************
*/

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -