ne.h revision 1.1
11.1Stsutsui/* $NetBSD: ne.h,v 1.1 2012/10/12 20:15:52 tsutsui Exp $ */ 21.1Stsutsui 31.1Stsutsui/* 41.1Stsutsui * Copyright (c) 2003 Tetsuya Isaki. All rights reserved. 51.1Stsutsui * 61.1Stsutsui * Redistribution and use in source and binary forms, with or without 71.1Stsutsui * modification, are permitted provided that the following conditions 81.1Stsutsui * are met: 91.1Stsutsui * 1. Redistributions of source code must retain the above copyright 101.1Stsutsui * notice, this list of conditions and the following disclaimer. 111.1Stsutsui * 2. Redistributions in binary form must reproduce the above copyright 121.1Stsutsui * notice, this list of conditions and the following disclaimer in the 131.1Stsutsui * documentation and/or other materials provided with the distribution. 141.1Stsutsui * 151.1Stsutsui * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 161.1Stsutsui * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 171.1Stsutsui * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 181.1Stsutsui * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 191.1Stsutsui * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 201.1Stsutsui * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 211.1Stsutsui * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 221.1Stsutsui * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 231.1Stsutsui * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 241.1Stsutsui * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 251.1Stsutsui * SUCH DAMAGE. 261.1Stsutsui */ 271.1Stsutsui 281.1Stsutsui#define inb(x) *(volatile uint8_t *)(x) 291.1Stsutsui#define inw(x) *(volatile uint16_t *)(x) 301.1Stsutsui#define outb(x, b) *(volatile uint8_t *)(x) = (b) 311.1Stsutsui#define outw(x, w) *(volatile uint16_t *)(x) = (w) 321.1Stsutsui 331.1Stsutsuiextern uint neaddr; 341.1Stsutsui 351.1Stsutsuiint EtherInit(unsigned char *); 361.1Stsutsuivoid EtherStop(void); 371.1Stsutsuivoid ne2000_readmem(int, uint8_t *, size_t); 381.1Stsutsuivoid ne2000_writemem(uint8_t *, int, size_t); 39