📄 ether_smc91c111.c
字号:
/************************************************************************** * File: ether_smc91c111.c * * This is an implementation of a ether.h interface. This implementation * supplies an ethernet driver particular to the SMC91c111 ethernet * chip set. This h/w dependent implemenation exposes the h/w independent * ether.h interface. * * Implemented with assitance from the SMC LAN91C111 h/w data sheet. * * See Also * ether.h * * Copyright (C) 2003 Cadenux, LLC (http://www.cadenux.com) * Author: Gregory Nutt (greg.nutt@cadenux.com) * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. * **************************************************************************//************************************************************************** * Included Files **************************************************************************/#include "types.h"#include "util.h"#include "ether.h"#include "net.h"#include "io.h"#include "memconfig.h"/************************************************************************** * Global Functions **************************************************************************/#ifdef BSPCONF_BTLDR_SMC91C111_DEBUGnsigned short readreg(unsigned short reg_offset);#endif/* ether_submit() * * Used by clients to send/receive datagrams to/from the ethernet * port. The underlying implementation will construct and prepend * the necessary ethernet frame header onto the front of the * client supplied datagram. For this reason it is important that * the client arrange that the bytes directly proceeding the * the *datagram buffer be allocated and available for the ether * submit function. sizeof(ether_hdr_t) bytes. */void ether_submit(submit_mode mode, // in char *device_MAC, // in char *server_MAC, // in void *datagram, // in/out unsigned short *num_bytes) // in/out{}/* ether_init() * * Called once at bootloader init to initialize the module and make * it ready for client use. */void ether_init(void){}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -