00001 #ifndef _DEV_NPL_H_ 00002 #define _DEV_NPL_H_ 00003 00004 /* 00005 * Copyright (C) 2005 by egnite Software GmbH 00006 * Copyright (C) 2009 by egnite GmbH 00007 * 00008 * All rights reserved. 00009 * 00010 * Redistribution and use in source and binary forms, with or without 00011 * modification, are permitted provided that the following conditions 00012 * are met: 00013 * 00014 * 1. Redistributions of source code must retain the above copyright 00015 * notice, this list of conditions and the following disclaimer. 00016 * 2. Redistributions in binary form must reproduce the above copyright 00017 * notice, this list of conditions and the following disclaimer in the 00018 * documentation and/or other materials provided with the distribution. 00019 * 3. Neither the name of the copyright holders nor the names of 00020 * contributors may be used to endorse or promote products derived 00021 * from this software without specific prior written permission. 00022 * 00023 * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS 00024 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00025 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00026 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE 00027 * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00028 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00029 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 00030 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 00031 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00032 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 00033 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00034 * SUCH DAMAGE. 00035 * 00036 * For additional information see http://www.ethernut.de/ 00037 */ 00038 00039 #include <dev/irqreg.h> 00040 00054 00062 #ifndef NPL_BASE 00063 #if defined(ETHERNUT3) 00064 #define NPL_BASE 0x21000000 00065 #else 00066 #define NPL_BASE 0xFF00 00067 #endif 00068 #endif 00069 00072 #define NPL_RSCR _SFR_MEM8(NPL_BASE + 0x00) 00073 00074 #define NPL_RSFON 0x0001 00075 #define NPL_RSFOFF 0x0002 00076 #define NPL_RSDTR 0x0004 00077 #define NPL_RSRTS 0x0008 00078 #define NPL_RSUS0E 0x0020 00079 #define NPL_RSUS1E 0x0040 00080 #define NPL_RSUS1P 0x0080 00084 #define NPL_IMR _SFR_MEM16(NPL_BASE + 0x04) 00085 00088 #define NPL_SLR _SFR_MEM16(NPL_BASE + 0x0C) 00089 00092 #define NPL_SCR _SFR_MEM16(NPL_BASE + 0x10) 00093 00094 #define NPL_RSCTS 0x0001 00095 #define NPL_RSDSR 0x0002 00096 #define NPL_RSDCD 0x0004 00097 #define NPL_RSRI 0x0008 00098 #define NPL_RTCALARM 0x0010 00099 #define NPL_LANWAKEUP 0x0020 00100 #define NPL_FMBUSY 0x0040 00101 #define NPL_MMCREADY 0x0080 00102 #define NPL_RSINVAL 0x0100 00103 #define NPL_NRSINVAL 0x0200 00104 #define NPL_MMCD 0x0400 00105 #define NPL_NMMCD 0x0800 00109 #define NPL_MMCDR _SFR_MEM8(NPL_BASE + 0x14) 00110 00113 #define NPL_XER _SFR_MEM8(NPL_BASE + 0x18) 00114 00115 #define NPL_MMCS 0x0001 00116 #define NPL_PANCS 0x0002 00117 #define NPL_USRLED 0x0004 00118 #define NPL_NPCS0 0x0008 00122 #define NPL_VIDR _SFR_MEM8(NPL_BASE + 0x1C) 00123 00124 extern IRQ_HANDLER sig_RSCTS; 00125 extern IRQ_HANDLER sig_RSDSR; 00126 extern IRQ_HANDLER sig_RSDCD; 00127 extern IRQ_HANDLER sig_RSRI; 00128 extern IRQ_HANDLER sig_RTCALARM; 00129 extern IRQ_HANDLER sig_LANWAKEUP; 00130 extern IRQ_HANDLER sig_FMBUSY; 00131 extern IRQ_HANDLER sig_RSINVAL; 00132 extern IRQ_HANDLER sig_NRSINVAL; 00133 extern IRQ_HANDLER sig_MMCD; 00134 extern IRQ_HANDLER sig_NMMCD; 00135 00136 __BEGIN_DECLS 00137 /* Function prototypes. */ 00138 extern int NplRegisterIrqHandler(IRQ_HANDLER * irq, void (*handler) (void *), void *arg); 00139 extern int NplIrqEnable(IRQ_HANDLER * irq); 00140 extern int NplIrqDisable(IRQ_HANDLER * irq); 00141 __END_DECLS 00142 /* */ 00144 #endif