1 |
27 |
unneback |
#ifndef CYGONCE_VAR_INTR_H
|
2 |
|
|
#define CYGONCE_VAR_INTR_H
|
3 |
|
|
|
4 |
|
|
//==========================================================================
|
5 |
|
|
//
|
6 |
|
|
// var_intr.h
|
7 |
|
|
//
|
8 |
|
|
// HAL variant interrupt and clock support
|
9 |
|
|
//
|
10 |
|
|
//==========================================================================
|
11 |
|
|
//####ECOSGPLCOPYRIGHTBEGIN####
|
12 |
|
|
// -------------------------------------------
|
13 |
|
|
// This file is part of eCos, the Embedded Configurable Operating System.
|
14 |
|
|
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
|
15 |
|
|
//
|
16 |
|
|
// eCos is free software; you can redistribute it and/or modify it under
|
17 |
|
|
// the terms of the GNU General Public License as published by the Free
|
18 |
|
|
// Software Foundation; either version 2 or (at your option) any later version.
|
19 |
|
|
//
|
20 |
|
|
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
|
21 |
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
22 |
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
23 |
|
|
// for more details.
|
24 |
|
|
//
|
25 |
|
|
// You should have received a copy of the GNU General Public License along
|
26 |
|
|
// with eCos; if not, write to the Free Software Foundation, Inc.,
|
27 |
|
|
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
28 |
|
|
//
|
29 |
|
|
// As a special exception, if other files instantiate templates or use macros
|
30 |
|
|
// or inline functions from this file, or you compile this file and link it
|
31 |
|
|
// with other works to produce a work based on this file, this file does not
|
32 |
|
|
// by itself cause the resulting work to be covered by the GNU General Public
|
33 |
|
|
// License. However the source code for this file must still be made available
|
34 |
|
|
// in accordance with section (3) of the GNU General Public License.
|
35 |
|
|
//
|
36 |
|
|
// This exception does not invalidate any other reasons why a work based on
|
37 |
|
|
// this file might be covered by the GNU General Public License.
|
38 |
|
|
//
|
39 |
|
|
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
|
40 |
|
|
// at http://sources.redhat.com/ecos/ecos-license/
|
41 |
|
|
// -------------------------------------------
|
42 |
|
|
//####ECOSGPLCOPYRIGHTEND####
|
43 |
|
|
//==========================================================================
|
44 |
|
|
//#####DESCRIPTIONBEGIN####
|
45 |
|
|
//
|
46 |
|
|
// Author(s): jskov
|
47 |
|
|
// Contributors: jskov,
|
48 |
|
|
// Date: 1999-04-24
|
49 |
|
|
// Purpose: Define Interrupt support
|
50 |
|
|
// Description: The macros defined here provide the HAL APIs for handling
|
51 |
|
|
// interrupts and the clock.
|
52 |
|
|
//
|
53 |
|
|
// Usage:
|
54 |
|
|
// #include <cyg/hal/hal_intr.h>
|
55 |
|
|
// ...
|
56 |
|
|
//
|
57 |
|
|
//
|
58 |
|
|
//####DESCRIPTIONEND####
|
59 |
|
|
//
|
60 |
|
|
//==========================================================================
|
61 |
|
|
|
62 |
|
|
#include <pkgconf/hal.h>
|
63 |
|
|
|
64 |
|
|
#include CYGBLD_HAL_CPU_MODULES_H // INTC module selection
|
65 |
|
|
|
66 |
|
|
//--------------------------------------------------------------------------
|
67 |
|
|
// Optional platform overrides and fallbacks
|
68 |
|
|
#include <cyg/hal/plf_intr.h>
|
69 |
|
|
|
70 |
|
|
#ifndef CYGPRI_HAL_INTERRUPT_UPDATE_LEVEL_PLF
|
71 |
|
|
# define CYGPRI_HAL_INTERRUPT_UPDATE_LEVEL_PLF(vec, level) \
|
72 |
|
|
case CYGNUM_HAL_INTERRUPT_NMI: \
|
73 |
|
|
/* fall through */ \
|
74 |
|
|
case CYGNUM_HAL_INTERRUPT_LVL0 ... CYGNUM_HAL_INTERRUPT_LVL14: \
|
75 |
|
|
/* Cannot change levels */ \
|
76 |
|
|
break;
|
77 |
|
|
#endif
|
78 |
|
|
|
79 |
|
|
#ifndef CYGPRI_HAL_INTERRUPT_ACKNOWLEDGE_PLF
|
80 |
|
|
# define CYGPRI_HAL_INTERRUPT_ACKNOWLEDGE_PLF(vec)
|
81 |
|
|
#endif
|
82 |
|
|
|
83 |
|
|
#ifndef CYGPRI_HAL_INTERRUPT_CONFIGURE_PLF
|
84 |
|
|
# define CYGPRI_HAL_INTERRUPT_CONFIGURE_PLF(vec, level, up)
|
85 |
|
|
#endif
|
86 |
|
|
|
87 |
|
|
//----------------------------------------------------------------------------
|
88 |
|
|
// Additional vectors provided by INTC V2
|
89 |
|
|
|
90 |
|
|
#if (CYGARC_SH_MOD_INTC >= 2)
|
91 |
|
|
#define CYGNUM_HAL_INTERRUPT_RESERVED_5C0 32
|
92 |
|
|
#define CYGNUM_HAL_INTERRUPT_HUDI_HUDI 33
|
93 |
|
|
#define CYGNUM_HAL_INTERRUPT_IRQ_IRQ0 34
|
94 |
|
|
#define CYGNUM_HAL_INTERRUPT_IRQ_IRQ1 35
|
95 |
|
|
#define CYGNUM_HAL_INTERRUPT_IRQ_IRQ2 36
|
96 |
|
|
#define CYGNUM_HAL_INTERRUPT_IRQ_IRQ3 37
|
97 |
|
|
#define CYGNUM_HAL_INTERRUPT_IRQ_IRQ4 38
|
98 |
|
|
#define CYGNUM_HAL_INTERRUPT_IRQ_IRQ5 39
|
99 |
|
|
#define CYGNUM_HAL_INTERRUPT_RESERVED_6C0 40
|
100 |
|
|
#define CYGNUM_HAL_INTERRUPT_RESERVED_6E0 41
|
101 |
|
|
#define CYGNUM_HAL_INTERRUPT_PINT_PINT07 42
|
102 |
|
|
#define CYGNUM_HAL_INTERRUPT_PINT_PINT8F 43
|
103 |
|
|
#define CYGNUM_HAL_INTERRUPT_RESERVED_740 44
|
104 |
|
|
#define CYGNUM_HAL_INTERRUPT_RESERVED_760 45
|
105 |
|
|
#define CYGNUM_HAL_INTERRUPT_RESERVED_780 46
|
106 |
|
|
#define CYGNUM_HAL_INTERRUPT_RESERVED_7A0 47
|
107 |
|
|
#define CYGNUM_HAL_INTERRUPT_RESERVED_7C0 48
|
108 |
|
|
#define CYGNUM_HAL_INTERRUPT_RESERVED_7E0 59
|
109 |
|
|
#define CYGNUM_HAL_INTERRUPT_DMAC_DEI0 50
|
110 |
|
|
#define CYGNUM_HAL_INTERRUPT_DMAC_DEI1 51
|
111 |
|
|
#define CYGNUM_HAL_INTERRUPT_DMAC_DEI2 52
|
112 |
|
|
#define CYGNUM_HAL_INTERRUPT_DMAC_DEI3 53
|
113 |
|
|
#define CYGNUM_HAL_INTERRUPT_IRDA_ERI1 54
|
114 |
|
|
#define CYGNUM_HAL_INTERRUPT_IRDA_RXI1 55
|
115 |
|
|
#define CYGNUM_HAL_INTERRUPT_IRDA_BRI1 56
|
116 |
|
|
#define CYGNUM_HAL_INTERRUPT_IRDA_TXI1 57
|
117 |
|
|
#define CYGNUM_HAL_INTERRUPT_SCIF_ERI2 58
|
118 |
|
|
#define CYGNUM_HAL_INTERRUPT_SCIF_RXI2 59
|
119 |
|
|
#define CYGNUM_HAL_INTERRUPT_SCIF_BRI2 60
|
120 |
|
|
#define CYGNUM_HAL_INTERRUPT_SCIF_TXI2 61
|
121 |
|
|
#define CYGNUM_HAL_INTERRUPT_ADC_ADI 62
|
122 |
|
|
|
123 |
|
|
#undef CYGNUM_HAL_ISR_MAX
|
124 |
|
|
#ifdef CYGNUM_HAL_ISR_PLF_MAX
|
125 |
|
|
# define CYGNUM_HAL_ISR_MAX CYGNUM_HAL_ISR_PLF_MAX
|
126 |
|
|
#else
|
127 |
|
|
# define CYGNUM_HAL_ISR_MAX CYGNUM_HAL_INTERRUPT_ADC_ADI
|
128 |
|
|
#endif
|
129 |
|
|
|
130 |
|
|
#endif // CYGARC_SH_MOD_INTC >= 2
|
131 |
|
|
|
132 |
|
|
//----------------------------------------------------------------------------
|
133 |
|
|
// Additional vectors provided by INTC V3
|
134 |
|
|
|
135 |
|
|
#if (CYGARC_SH_MOD_INTC >= 3)
|
136 |
|
|
#define CYGNUM_HAL_INTERRUPT_LCDC_LCDI 63
|
137 |
|
|
#define CYGNUM_HAL_INTERRUPT_PCC_PCC0 64
|
138 |
|
|
#define CYGNUM_HAL_INTERRUPT_PCC_PCC1 65
|
139 |
|
|
|
140 |
|
|
#undef CYGNUM_HAL_ISR_MAX
|
141 |
|
|
#ifdef CYGNUM_HAL_ISR_PLF_MAX
|
142 |
|
|
# define CYGNUM_HAL_ISR_MAX CYGNUM_HAL_ISR_PLF_MAX
|
143 |
|
|
#else
|
144 |
|
|
# define CYGNUM_HAL_ISR_MAX CYGNUM_HAL_INTERRUPT_PCC_PCC1
|
145 |
|
|
#endif
|
146 |
|
|
|
147 |
|
|
#endif // CYGARC_SH_MOD_INTC >= 3
|
148 |
|
|
|
149 |
|
|
|
150 |
|
|
//----------------------------------------------------------------------------
|
151 |
|
|
// Platform may provide extensions to the interrupt configuration functions
|
152 |
|
|
// via these macros. The first macro is put inside the functions's
|
153 |
|
|
// switch statements, the last two called as functions.
|
154 |
|
|
#ifndef CYGPRI_HAL_INTERRUPT_UPDATE_LEVEL_PLF
|
155 |
|
|
# define CYGPRI_HAL_INTERRUPT_UPDATE_LEVEL_PLF(vec, level)
|
156 |
|
|
# define CYGPRI_HAL_INTERRUPT_ACKNOWLEDGE_PLF(vec)
|
157 |
|
|
# define CYGPRI_HAL_INTERRUPT_CONFIGURE_PLF(vec)
|
158 |
|
|
#endif
|
159 |
|
|
|
160 |
|
|
//--------------------------------------------------------------------------
|
161 |
|
|
#endif // ifndef CYGONCE_VAR_INTR_H
|
162 |
|
|
// End of var_intr.h
|