Nut/OS  4.10.3
API Reference
cs8900.h
Go to the documentation of this file.
00001 #ifndef _CDCS_CS8900_H_
00002 #define _CDCS_CS8900_H_
00003 
00004 /*
00005  * Copyright (C) 2002 by Call Direct Cellular Solutions Pty. Ltd. All rights reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted provided that the following conditions
00009  * are met:
00010  *
00011  * 1. Redistributions of source code must retain the above copyright
00012  *    notice, this list of conditions and the following disclaimer.
00013  * 2. Redistributions in binary form must reproduce the above copyright
00014  *    notice, this list of conditions and the following disclaimer in the
00015  *    documentation and/or other materials provided with the distribution.
00016  * 3. All advertising materials mentioning features or use of this
00017  *    software must display the following acknowledgement:
00018  *
00019  *    This product includes software developed by Call Direct Cellular Solutions Pty. Ltd.
00020  *    and its contributors.
00021  *
00022  * THIS SOFTWARE IS PROVIDED BY CALL DIRECT CELLULAR SOLUTIONS AND CONTRIBUTORS
00023  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00024  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00025  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CALL DIRECT
00026  * CELLULAR SOLUTIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00027  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00028  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00029  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00030  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00031  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00032  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00033  * SUCH DAMAGE.
00034  *
00035  * For additional information see http://www.calldirect.com.au/
00036  */
00037  
00038 /*
00039  * $Log$
00040  * Revision 1.1  2005/07/26 18:02:27  haraldkipp
00041  * Moved from dev.
00042  *
00043  * Revision 1.2  2004/05/25 11:39:48  olereinhardt
00044  * Define NUT_CS8900_OLD to get the old functionality back again
00045  *
00046  * Revision 1.1  2004/05/24 17:09:17  olereinhardt
00047  * Changed base address handling in cs8900.c and moved cs8900.h to /include/dev
00048  * Base address can now be passed to the nic driver by NutRegisterDevice.
00049  * Removed some Assembler code in cs8900.c
00050  *
00051  * Added some databus waitstate settings for the upper half of the address space in os/arch/avr_nutinit.c. Now three waitstates are default for 0x8000-0xFFFF
00052  *
00053  * Added terminal device driver for hd44780 compatible LCD displays directly
00054  * connected to the memory bus (memory mapped). See hd44780.c for more information.
00055  * Therefore some minor changed in include/dev/term.h and dev/term.c are needet to
00056  * pass a base address to the lcd driver.
00057  *
00058  * Revision 1.1  2003/07/20 16:37:21  haraldkipp
00059  * CrystalTek 8900A driver added.
00060  *
00061  *
00062  * Revision 1.0  2002/10/1 MJC CDCS
00063  * created
00064  *
00065  */
00066 
00067 // Cirrus Logic CS8900a I/O Registers
00068 
00069 #ifdef  NUT_CS8900_OLD
00070 
00071 #define CS_DATA_P0              0x1100
00072 #define CS_DATA_P1              0x1102
00073 #define CS_TX_CMD_I             0x1104
00074 #define CS_TX_LEN_I             0x1106
00075 #define CS_INT_STAT             0x1108
00076 #define CS_PP_PTR               0x110A
00077 #define CS_PP_DATA0             0x110C
00078 #define CS_PP_DATA1             0x110E
00079 
00080 #else
00081 
00082 #define CS_DATA_P0              (cs_base + 0x0000)
00083 #define CS_DATA_P1              (cs_base + 0x0002)
00084 #define CS_TX_CMD_I             (cs_base + 0x0004)
00085 #define CS_TX_LEN_I             (cs_base + 0x0006)
00086 #define CS_INT_STAT             (cs_base + 0x0008)
00087 #define CS_PP_PTR               (cs_base + 0x000A)
00088 #define CS_PP_DATA0             (cs_base + 0x000C)
00089 #define CS_PP_DATA1             (cs_base + 0x000E)
00090 
00091 #endif
00092 
00093 
00094 // Cirrus Logic CS8900a Packet Page registers
00095 #define CS_PROD_ID              0x0000
00096 #define CS_IO_BASE              0x0020
00097 #define CS_INT_NUM              0x0022
00098 #define CS_DMA_CHAN             0x0024
00099 #define CS_DMA_SOF              0x0026
00100 #define CS_DMA_FCNT             0x0028
00101 #define CS_DMA_RXCNT    0x002A
00102 #define CS_MEM_BASE             0x002C
00103 #define CS_BOOT_BASE    0x0030
00104 #define CS_BOOT_MASK    0x0034
00105 #define CS_EE_CMD               0x0040
00106 #define CS_EE_DATA              0x0042
00107 #define CS_RX_FRM_CNT   0x0050
00108 
00109 #define CS_ISQ                  0x0120
00110 #define CS_RX_CFG               0x0102
00111 #define CS_RX_EVENT             0x0124
00112 #define CS_RX_CTL               0x0104
00113 #define CS_TX_CFG               0x0106
00114 #define CS_TX_EVENT             0x0128
00115 #define CS_TX_CMD_P             0x0108
00116 #define CS_BUF_CFG              0x010A
00117 #define CS_BUF_EVENT    0x012C
00118 #define CS_RX_MISS              0x0130
00119 #define CS_TX_COLL              0x0132
00120 #define CS_LINE_CTRL    0x0112
00121 #define CS_LINE_STAT    0x0134
00122 #define CS_SELF_CTRL    0x0114
00123 #define CS_SELF_STAT    0x0136
00124 #define CS_BUS_CTRL             0x0116
00125 #define CS_BUS_STAT             0x0138
00126 #define CS_TEST_CTRL    0x0118
00127 #define CS_AUI_TDR              0x013C
00128 
00129 #define CS_PP_TX_CMD    0x0144
00130 #define CS_PP_TX_LEN    0x0146
00131 
00132 #define CS_IEEE_ADDR    0x0158
00133 
00134 #define         RESETE          0x80
00135 
00136 #endif