|
GNU Radio 3.3.0 C++ API
|
00001 /* -*- c -*- */ 00002 /* 00003 * Copyright 2007 Free Software Foundation, Inc. 00004 * 00005 * This program is free software: you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation, either version 3 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00018 00019 #ifndef INCLUDED_ETH_MAC_REGS_H 00020 #define INCLUDED_ETH_MAC_REGS_H 00021 00022 /* 00023 * Simple GEMAC 00024 * 00025 */ 00026 typedef struct { 00027 volatile int settings; 00028 volatile int ucast_hi; 00029 volatile int ucast_lo; 00030 volatile int mcast_hi; 00031 volatile int mcast_lo; 00032 volatile int miimoder; 00033 volatile int miiaddress; 00034 volatile int miitx_data; 00035 volatile int miicommand; 00036 volatile int miistatus; 00037 volatile int miirx_data; 00038 volatile int pause_time; 00039 volatile int pause_thresh; 00040 } eth_mac_regs_t; 00041 00042 // settings register 00043 #define MAC_SET_PAUSE_EN (1 << 0) // Makes us respect received pause frames (normally on) 00044 #define MAC_SET_PASS_ALL (1 << 1) // Enables promiscuous mode, currently broken 00045 #define MAC_SET_PASS_PAUSE (1 << 2) // Sends pause frames through (normally off) 00046 #define MAC_SET_PASS_BCAST (1 << 3) // Sends broadcast frames through (normally on) 00047 #define MAC_SET_PASS_MCAST (1 << 4) // Sends multicast frames that match mcast addr (normally off) 00048 #define MAC_SET_PASS_UCAST (1 << 5) // Sends unicast (normal) frames through if they hit in address filter (normally on) 00049 #define MAC_SET_PAUSE_SEND_EN (1 << 6) // Enables sending pause frames 00050 00051 // miicommand register 00052 #define MIIC_SCANSSTAT (1 << 0) // Scan status 00053 #define MIIC_RSTAT (1 << 1) // Read status 00054 #define MIIC_WCTRLDATA (1 << 2) // Write control data 00055 00056 // miistatus register 00057 #define MIIS_LINKFAIL (1 << 0) // The link failed 00058 #define MIIS_BUSY (1 << 1) // The MII is busy (operation in progress) 00059 #define MIIS_NVALID (1 << 2) // The data in the status register is invalid 00060 // This it is only valid when the scan status is active. 00061 00062 #endif /* INCLUDED_ETH_MAC_REGS_H */