source: rtems/c/src/lib/libcpu/arm/at91rm9200/irq/irq.h @ 93f4a906

4.104.114.84.9
Last change on this file since 93f4a906 was 93f4a906, checked in by Joel Sherrill <joel.sherrill@…>, on Mar 12, 2007 at 11:17:07 AM

2007-03-12 Joel Sherrill <joel@…>

  • at91rm9200/clock/clock.c, at91rm9200/dbgu/dbgu.c, at91rm9200/include/at91rm9200.h, at91rm9200/include/at91rm9200_dbgu.h, at91rm9200/include/at91rm9200_emac.h, at91rm9200/include/at91rm9200_gpio.h, at91rm9200/include/at91rm9200_mem.h, at91rm9200/include/at91rm9200_pmc.h, at91rm9200/include/bits.h, at91rm9200/irq/bsp_irq_asm.S, at91rm9200/irq/bsp_irq_init.c, at91rm9200/irq/irq.c, at91rm9200/irq/irq.h, at91rm9200/pmc/pmc.c, at91rm9200/timer/timer.c, mc9328mxl/clock/clockdrv.c, mc9328mxl/include/mc9328mxl.h, mc9328mxl/irq/bsp_irq_asm.S, mc9328mxl/irq/bsp_irq_init.c, mc9328mxl/irq/irq.c, mc9328mxl/irq/irq.h, mc9328mxl/timer/timer.c, s3c2400/clock/clockdrv.c, s3c2400/timer/timer.c: Correct license URL and/or fix mistake in copyright notice. Both of these mistakes appear to be from code submitted after these changes were made previously.
  • Property mode set to 100644
File size: 3.8 KB
Line 
1/*
2 * Interrupt handler Header file
3 *
4 * Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com>
5 *     
6 *  The license and distribution terms for this file may be
7 *  found in the file LICENSE in this distribution or at
8 *
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *
12 *  $Id$
13 */
14
15#ifndef __IRQ_H__
16#define __IRQ_H__
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#ifndef __asm__
23
24/*
25 * Include some preprocessor value also used by assember code
26 */
27 
28#include <rtems.h>
29#include <at91rm9200.h>
30
31extern void default_int_handler();
32/***********************************************************************
33 * Constants
34 **********************************************************************/
35/* possible interrupt sources on the AT91RM9200 */
36#define AT91RM9200_INT_FIQ        0
37#define AT91RM9200_INT_SYSIRQ     1
38#define AT91RM9200_INT_PIOA       2
39#define AT91RM9200_INT_PIOB       3
40#define AT91RM9200_INT_PIOC       4
41#define AT91RM9200_INT_PIOD       5
42#define AT91RM9200_INT_US0        6
43#define AT91RM9200_INT_US1        7
44#define AT91RM9200_INT_US2        8
45#define AT91RM9200_INT_US3        9
46#define AT91RM9200_INT_MCI       10
47#define AT91RM9200_INT_UDP       11
48#define AT91RM9200_INT_TWI       12
49#define AT91RM9200_INT_SPI       13
50#define AT91RM9200_INT_SSC0      14
51#define AT91RM9200_INT_SSC1      15
52#define AT91RM9200_INT_SSC2      16
53#define AT91RM9200_INT_TC0       17
54#define AT91RM9200_INT_TC1       18
55#define AT91RM9200_INT_TC2       19
56#define AT91RM9200_INT_TC3       20
57#define AT91RM9200_INT_TC4       21
58#define AT91RM9200_INT_TC5       22
59#define AT91RM9200_INT_UHP       23
60#define AT91RM9200_INT_EMAC      24
61#define AT91RM9200_INT_IRQ0      25
62#define AT91RM9200_INT_IRQ1      26
63#define AT91RM9200_INT_IRQ2      27
64#define AT91RM9200_INT_IRQ3      28
65#define AT91RM9200_INT_IRQ4      28
66#define AT91RM9200_INT_IRQ5      30
67#define AT91RM9200_INT_IRQ6      31
68#define AT91RM9200_MAX_INT       32
69
70/* vector table used by shared/irq_init.c */
71/* we can treat the AT91RM9200 AIC_SVR_BASE as */
72/* a vector table */
73#define VECTOR_TABLE AIC_SVR_BASE
74                                                                                           
75typedef unsigned char  rtems_irq_level;
76typedef unsigned char  rtems_irq_trigger;
77
78struct  __rtems_irq_connect_data__;     /* forward declaratiuon */
79typedef unsigned int rtems_irq_number;
80typedef void (*rtems_irq_hdl)       (uint32_t vector);
81typedef void (*rtems_irq_enable)    (const struct __rtems_irq_connect_data__*);
82typedef void (*rtems_irq_disable)   (const struct __rtems_irq_connect_data__*);
83typedef int  (*rtems_irq_is_enabled)(const struct __rtems_irq_connect_data__*);
84
85typedef struct __rtems_irq_connect_data__ {
86    /* IRQ line */
87    rtems_irq_number             name;
88
89    /* Handler */
90    rtems_irq_hdl                 hdl;
91
92    /* function for enabling interrupts at device level. */
93    rtems_irq_enable              on;
94
95    /* function for disabling interrupts at device level. */
96    rtems_irq_disable             off;
97
98    /* Function to test if interrupt is enabled */
99    rtems_irq_is_enabled        isOn;
100
101    /* priority level of interrupt */
102    rtems_irq_level               irqLevel;
103
104    /* Trigger method (rising/falling edge or high/low level) */
105    rtems_irq_trigger             irqTrigger;
106} rtems_irq_connect_data;
107
108/*
109 * function to initialize the interrupt for a specific BSP
110 */
111void BSP_rtems_irq_mngt_init();
112
113
114/*
115 * function to connect a particular irq handler.
116 */
117int BSP_install_rtems_irq_handler       (const rtems_irq_connect_data*);
118
119/*
120 * function to get the current RTEMS irq handler for ptr->name.
121 */
122int BSP_get_current_rtems_irq_handler   (rtems_irq_connect_data* ptr);
123
124/*
125 * function to disconnect the RTEMS irq handler for ptr->name.
126 */
127int BSP_remove_rtems_irq_handler        (const rtems_irq_connect_data*);
128
129#endif /* __asm__ */
130
131#ifdef __cplusplus
132}
133#endif
134
135#endif /* __IRQ_H__ */
Note: See TracBrowser for help on using the repository browser.