npl.h

Go to the documentation of this file.
00001 #ifndef _DEV_NPL_H_
00002 #define _DEV_NPL_H_
00003 
00004 /*
00005  * Copyright (C) 2005 by egnite Software GmbH. 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. Neither the name of the copyright holders nor the names of
00017  *    contributors may be used to endorse or promote products derived
00018  *    from this software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
00021  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00022  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00023  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
00024  * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00025  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00026  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00027  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00028  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00029  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00030  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00031  * SUCH DAMAGE.
00032  *
00033  * For additional information see http://www.ethernut.de/
00034  */
00035 
00036 #include <dev/irqreg.h>
00037 
00059 
00067 #ifndef NPL_BASE
00068 #if defined(ETHERNUT3)
00069 #define NPL_BASE        0x21000000
00070 #else
00071 #define NPL_BASE        0xFF00
00072 #endif
00073 #endif
00074 
00077 #define NPL_RSCR        _SFR_MEM8(NPL_BASE + 0x00)
00078 
00079 #define NPL_RSFON       0x0001  
00080 #define NPL_RSFOFF      0x0002  
00081 #define NPL_RSDTR       0x0004  
00082 #define NPL_RSRTS       0x0008  
00083 #define NPL_RSUS0E      0x0020  
00084 #define NPL_RSUS1E      0x0040  
00085 #define NPL_RSUS1P      0x0080  
00089 #define NPL_IMR         _SFR_MEM16(NPL_BASE + 0x04)
00090 
00093 #define NPL_SLR         _SFR_MEM16(NPL_BASE + 0x0C)
00094 
00097 #define NPL_SCR         _SFR_MEM16(NPL_BASE + 0x10)
00098 
00099 #define NPL_RSCTS       0x0001  
00100 #define NPL_RSDSR       0x0002  
00101 #define NPL_RSDCD       0x0004  
00102 #define NPL_RSRI        0x0008  
00103 #define NPL_RTCALARM    0x0010  
00104 #define NPL_LANWAKEUP   0x0020  
00105 #define NPL_FMBUSY      0x0040  
00106 #define NPL_MMCREADY    0x0080  
00107 #define NPL_RSINVAL     0x0100  
00108 #define NPL_NRSINVAL    0x0200  
00109 #define NPL_MMCD        0x0400  
00110 #define NPL_NMMCD       0x0800  
00114 #define NPL_MMCDR       _SFR_MEM8(NPL_BASE + 0x14)
00115 
00118 #define NPL_XER         _SFR_MEM8(NPL_BASE + 0x18)
00119 
00120 #define NPL_MMCS        0x0001  
00121 #define NPL_PANCS       0x0002  
00122 #define NPL_USRLED      0x0004  
00123 #define NPL_NPCS0       0x0008  
00127 #define NPL_VIDR        _SFR_MEM8(NPL_BASE + 0x1C)
00128 
00129 extern IRQ_HANDLER sig_RSCTS;
00130 extern IRQ_HANDLER sig_RSDSR;
00131 extern IRQ_HANDLER sig_RSDCD;
00132 extern IRQ_HANDLER sig_RSRI;
00133 extern IRQ_HANDLER sig_RTCALARM;
00134 extern IRQ_HANDLER sig_LANWAKEUP;
00135 extern IRQ_HANDLER sig_FMBUSY;
00136 extern IRQ_HANDLER sig_RSINVAL;
00137 extern IRQ_HANDLER sig_NRSINVAL;
00138 extern IRQ_HANDLER sig_MMCD;
00139 extern IRQ_HANDLER sig_NMMCD;
00140 
00141 __BEGIN_DECLS
00142 /* Function prototypes. */
00143 extern int NplRegisterIrqHandler(IRQ_HANDLER * irq, void (*handler) (void *), void *arg);
00144 extern int NplIrqEnable(IRQ_HANDLER * irq);
00145 extern int NplIrqDisable(IRQ_HANDLER * irq);
00146 __END_DECLS
00147 /* */
00149 #endif

© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/