OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [ColdFire_MCF52233_Eclipse/] [RTOSDemo/] [webserver/] [FEC.h] - Blame information for rev 578

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 jeremybenn
/*
2
 * File:    fec.h
3
 * Purpose: Driver for the Fast Ethernet Controller (FEC)
4
 *
5
 * Notes:
6
 */
7
 
8
#ifndef _FEC_H_
9
#define _FEC_H_
10
 
11
#include "eth.h"
12
#include "fecbd.h"
13
#include "mii.h"
14
#include "eth_phy.h"
15
 
16
/********************************************************************/
17
 
18
/* External Interface Modes */
19
#define FEC_MODE_7WIRE          0   /* Old 7-wire (AMD) mode */
20
#define FEC_MODE_MII            1   /* Media Independent Interface */
21
#define FEC_MODE_RMII           2   /* Reduced MII */
22
#define FEC_MODE_LOOPBACK       3   /* Internal Loopback */
23
 
24
#define INTC_LVL_FEC                    3
25
/*
26
 * FEC Configuration Parameters
27
 */
28
typedef struct
29
{
30
    uint8      ch;       /* FEC channel              */
31
    uint8      mode;     /* Transceiver mode         */
32
    MII_SPEED  speed;    /* Ethernet Speed           */
33
    MII_DUPLEX duplex;   /* Ethernet Duplex          */
34
    uint8      prom;     /* Promiscuous Mode?        */
35
    uint8      mac[6];   /* Ethernet Address         */
36
    uint8      phyaddr;  /* PHY address              */
37
    uint8      initphy;  /* Init PHY?                */
38
    int        nrxbd;    /* Number of RxBDs          */
39
    int        ntxbd;    /* Number of TxBDs          */
40
} FEC_CONFIG;
41
#define YES 1
42
#define NO 0
43
/*
44
 * FEC Event Log
45
 */
46
typedef struct {
47
    int errors;     /* total count of errors   */
48
    int hberr;      /* heartbeat error         */
49
    int babr;       /* babbling receiver       */
50
    int babt;       /* babbling transmitter    */
51
    int gra;        /* graceful stop complete  */
52
    int txf;        /* transmit frame          */
53
    int txb;        /* transmit buffer         */
54
    int rxf;        /* receive frame           */
55
    int rxb;        /* received buffer         */
56
    int mii;        /* MII                     */
57
    int eberr;      /* FEC/DMA fatal bus error */
58
    int lc;         /* late collision          */
59
    int rl;         /* collision retry limit   */
60
    int un;         /* Tx FIFO underflow       */
61
    int rfsw_inv;   /* Invalid bit in RFSW     */
62
    int rfsw_l;     /* RFSW Last in Frame      */
63
    int rfsw_m;     /* RFSW Miss               */
64
    int rfsw_bc;    /* RFSW Broadcast          */
65
    int rfsw_mc;    /* RFSW Multicast          */
66
    int rfsw_lg;    /* RFSW Length Violation   */
67
    int rfsw_no;    /* RFSW Non-octet          */
68
    int rfsw_cr;    /* RFSW Bad CRC            */
69
    int rfsw_ov;    /* RFSW Overflow           */
70
    int rfsw_tr;    /* RFSW Truncated          */
71
} FEC_EVENT_LOG;
72
 
73
void vFECInit( void );
74
unsigned short usFECGetRxedData( void );
75
void vFECSendData( void );
76
void vFECRxProcessingCompleted( void );
77
 
78
/********************************************************************/
79
 
80
#endif /* _FEC_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.