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

📄 mcf5xxx_fecx.h

📁 motorola 针对coldfire 5275 评估板的Dbug bootloader源程序
💻 H
字号:
/*
 * File:    fecx.h
 * Purpose: Driver for the Fast Ethernet Controller (FEC)
 *
 * Notes:       
 */

#ifndef _FEC_H_
#define _FEC_H_

/********************************************************************/
/* MII Speed Settings */
#define FEC_MII_10BASE_T        0
#define FEC_MII_100BASE_TX      1

/* MII Duplex Settings */
#define FEC_MII_HALF_DUPLEX     0
#define FEC_MII_FULL_DUPLEX     1

/* Timeout for MII communications */
#define FEC_MII_TIMEOUT         0x10000

/* External Interface Modes */
#define FEC_MODE_7WIRE          0
#define FEC_MODE_MII            1
#define FEC_MODE_LOOPBACK       2   /* Internal Loopback */

/*
 * FEC Event Log
 */
typedef struct {
    int errors;     /* total count of errors   */
    int hberr;      /* heartbeat error         */
    int babr;       /* babbling receiver       */
    int babt;       /* babbling transmitter    */
    int gra;        /* graceful stop complete  */
    int txf;        /* transmit frame          */
    int txb;        /* transmit buffer         */
    int rxf;        /* receive frame           */
    int rxb;        /* received buffer         */
    int mii;        /* MII                     */
    int eberr;      /* FEC/DMA fatal bus error */
    int lc;         /* late collision          */
    int rl;         /* collision retry limit   */
    int un;         /* Tx FIFO underflow       */
    int rfsw_inv;   /* Invalid bit in RFSW     */
    int rfsw_l;     /* RFSW Last in Frame      */
    int rfsw_m;     /* RFSW Miss               */
    int rfsw_bc;    /* RFSW Broadcast          */
    int rfsw_mc;    /* RFSW Multicast          */
    int rfsw_lg;    /* RFSW Length Violation   */
    int rfsw_no;    /* RFSW Non-octet          */
    int rfsw_cr;    /* RFSW Bad CRC            */
    int rfsw_ov;    /* RFSW Overflow           */
    int rfsw_tr;    /* RFSW Truncated          */
} FEC_EVENT_LOG;

int   fec_mii_write (uint8, uint8, uint8, uint16);
int   fec_mii_read (uint8, uint8, uint8, uint16 *);
void  fec_mii_init (uint8, uint32);
void  fec_mib_init (uint8);
void  fec_mib_dump (uint8);
void  fec_log_init (uint8);
void  fec_log_dump (uint8);
void  fec_debug_dump (uint8);
void  fec_duplex (uint8, uint8);
uint8 fec_hash_address (const uint8 *);
void  fec_set_address (uint8, const uint8 *);
void  fec_reset (uint8);
void  fec_init (uint8, uint8, const uint8 *);
void  fec_rx_continue (uint8);
void  fec_rx_handler (NIF *);
void  fec_tx_continue (uint8);
void  fec_tx_stop (uint8);
void  fec_tx_handler (NIF *);
int   fec_send (NIF *, uint8 *, uint8 *, uint16 , NBUF *);
void  fec_irq_enable (uint8);
void  fec_irq_disable (uint8);
int   fec_irq_handler (void*, void*);
void  fec_eth_setup (uint8, uint8, const uint8 *);
void  fec_eth_reset (uint8);
void  fec_eth_stop (uint8);

/********************************************************************/

#endif /* _FEC_H_ */

⌨️ 快捷键说明

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