📄 rtlregs.h
字号:
#ifndef _DEV_RTLREGS_H_
#define _DEV_RTLREGS_H_
/*
* Copyright (C) 2001-2002 by egnite Software GmbH. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgement:
*
* This product includes software developed by egnite Software GmbH
* and its contributors.
*
* THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
* ``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 EGNITE
* SOFTWARE GMBH OR CONTRIBUTORS 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.
*
* For additional information see http://www.ethernut.de/
*
* -
* Portions Copyright (C) 2000 David J. Hudson <dave@humbug.demon.co.uk>
*
* This file is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You can redistribute this file and/or modify it under the terms of the GNU
* General Public License (GPL) as published by the Free Software Foundation;
* either version 2 of the License, or (at your discretion) any later version.
* See the accompanying file "copying-gpl.txt" for more details.
*
* As a special exception to the GPL, permission is granted for additional
* uses of the text contained in this file. See the accompanying file
* "copying-liquorice.txt" for details.
* -
* Portions Copyright (c) 1983, 1993 by
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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.
*/
/*
* $Log: rtlregs.h,v $ * Revision 1.1 2006/06/17 22:41:21 adamdunkels * Import of the contiki-2.x development code from the SICS internal CVS server * * Revision 1.1 2005/09/19 23:05:35 adam * AVR device drivers * * Revision 1.1 2005/05/18 19:03:23 adam * Initial import of Contiki AVR port * * Revision 1.1 2003/07/04 10:54:52 adamdunkels * First version of the AVR port * * Revision 1.1 2003/02/05 20:49:07 adam * *** empty log message *** *
* Revision 1.6 2002/10/29 15:27:36 harald
* *** empty log message ***
*
* Revision 1.5 2002/06/26 17:29:08 harald
* First pre-release with 2.4 stack
*
*/
/*!
* \brief Realtek 8019AS register definitions.
*/
/*@{*/
/*
* Register offset applicable to all register pages.
*/
#define NIC_CR 0x00 /*!< \brief Command register */
#define NIC_IOPORT 0x10 /*!< \brief I/O data port */
#define NIC_RESET 0x1f /*!< \brief Reset port */
/*
* Page 0 register offsets.
*/
#define NIC_PG0_CLDA0 0x01 /*!< \brief Current local DMA address 0 */
#define NIC_PG0_PSTART 0x01 /*!< \brief Page start register */
#define NIC_PG0_CLDA1 0x02 /*!< \brief Current local DMA address 1 */
#define NIC_PG0_PSTOP 0x02 /*!< \brief Page stop register */
#define NIC_PG0_BNRY 0x03 /*!< \brief Boundary pointer */
#define NIC_PG0_TSR 0x04 /*!< \brief Transmit status register */
#define NIC_PG0_TPSR 0x04 /*!< \brief Transmit page start address */
#define NIC_PG0_NCR 0x05 /*!< \brief Number of collisions register */
#define NIC_PG0_TBCR0 0x05 /*!< \brief Transmit byte count register 0 */
#define NIC_PG0_FIFO 0x06 /*!< \brief FIFO */
#define NIC_PG0_TBCR1 0x06 /*!< \brief Transmit byte count register 1 */
#define NIC_PG0_ISR 0x07 /*!< \brief Interrupt status register */
#define NIC_PG0_CRDA0 0x08 /*!< \brief Current remote DMA address 0 */
#define NIC_PG0_RSAR0 0x08 /*!< \brief Remote start address register 0
Low byte address to read from the buffer. */
#define NIC_PG0_CRDA1 0x09 /*!< \brief Current remote DMA address 1 */
#define NIC_PG0_RSAR1 0x09 /*!< \brief Remote start address register 1
High byte address to read from the buffer. */
#define NIC_PG0_RBCR0 0x0a /*!< \brief Remote byte count register 0
Low byte of the number of bytes to read
from the buffer. */
#define NIC_PG0_RBCR1 0x0b /*!< \brief Remote byte count register 1
High byte of the number of bytes to read
from the buffer. */
#define NIC_PG0_RSR 0x0c /*!< \brief Receive status register */
#define NIC_PG0_RCR 0x0c /*!< \brief Receive configuration register */
#define NIC_PG0_CNTR0 0x0d /*!< \brief Tally counter 0 (frame alignment errors) */
#define NIC_PG0_TCR 0x0d /*!< \brief Transmit configuration register */
#define NIC_PG0_CNTR1 0x0e /*!< \brief Tally counter 1 (CRC errors) */
#define NIC_PG0_DCR 0x0e /*!< \brief Data configuration register */
#define NIC_PG0_CNTR2 0x0f /*!< \brief Tally counter 2 (Missed packet errors) */
#define NIC_PG0_IMR 0x0f /*!< \brief Interrupt mask register */
/*
* Page 1 register offsets.
*/
#define NIC_PG1_PAR0 0x01 /*!< \brief Physical address register 0 */
#define NIC_PG1_PAR1 0x02 /*!< \brief Physical address register 1 */
#define NIC_PG1_PAR2 0x03 /*!< \brief Physical address register 2 */
#define NIC_PG1_PAR3 0x04 /*!< \brief Physical address register 3 */
#define NIC_PG1_PAR4 0x05 /*!< \brief Physical address register 4 */
#define NIC_PG1_PAR5 0x06 /*!< \brief Physical address register 5 */
#define NIC_PG1_CURR 0x07 /*!< \brief Current page register
The next incoming packet will be stored
at this page address. */
#define NIC_PG1_MAR0 0x08 /*!< \brief Multicast address register 0 */
#define NIC_PG1_MAR1 0x09 /*!< \brief Multicast address register 1 */
#define NIC_PG1_MAR2 0x0a /*!< \brief Multicast address register 2 */
#define NIC_PG1_MAR3 0x0b /*!< \brief Multicast address register 3 */
#define NIC_PG1_MAR4 0x0c /*!< \brief Multicast address register 4 */
#define NIC_PG1_MAR5 0x0d /*!< \brief Multicast address register 5 */
#define NIC_PG1_MAR6 0x0e /*!< \brief Multicast address register 6 */
#define NIC_PG1_MAR7 0x0f /*!< \brief Multicast address register 7 */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -