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

4.104.114.84.9
Last change on this file since af85485 was af85485, checked in by Jay Monkman <jtm@…>, on Jul 15, 2004 at 6:24:14 AM

2004-07-15 Jay Monkman

  • ChangeLog?, Makefile.am, clock/.cvsignore, clock/clock.c, dbgu/.cvsignore, dbgu/dbgu.c, include/at91rm9200.h, include/at91rm9200_dbgu.h, include/at91rm9200_emac.h, include/at91rm9200_gpio.h, include/at91rm9200_mem.h, include/at91rm9200_pmc.h, include/bits.h, irq/.cvsignore, irq/bsp_irq_asm.S, irq/bsp_irq_init.c, irq/irq.c, irq/irq.h, pmc/pmc.c, timer/.cvsignore, timer/timer.c: New files.
  • Property mode set to 100644
File size: 3.5 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.OARcorp.com/rtems/license.html.
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/* enum of the possible interrupt sources on the AT91RM9200 */
36typedef enum {
37    AT91RM9200_INT_FIQ  = 0,
38    AT91RM9200_INT_SYSIRQ,
39    AT91RM9200_INT_PIOA,
40    AT91RM9200_INT_PIOB,
41    AT91RM9200_INT_PIOC,
42    AT91RM9200_INT_PIOD,
43    AT91RM9200_INT_US0,
44    AT91RM9200_INT_US1,
45    AT91RM9200_INT_US2,
46    AT91RM9200_INT_US3,
47    AT91RM9200_INT_MCI,
48    AT91RM9200_INT_UDP,
49    AT91RM9200_INT_TWI,
50    AT91RM9200_INT_SPI,
51    AT91RM9200_INT_SSC0,
52    AT91RM9200_INT_SSC1,
53    AT91RM9200_INT_SSC2,
54    AT91RM9200_INT_TC0,
55    AT91RM9200_INT_TC1,
56    AT91RM9200_INT_TC2,
57    AT91RM9200_INT_TC3,
58    AT91RM9200_INT_TC4,
59    AT91RM9200_INT_TC5,
60    AT91RM9200_INT_UHP,
61    AT91RM9200_INT_EMAC,
62    AT91RM9200_INT_IRQ0,
63    AT91RM9200_INT_IRQ1,
64    AT91RM9200_INT_IRQ2,
65    AT91RM9200_INT_IRQ3,
66    AT91RM9200_INT_IRQ4,
67    AT91RM9200_INT_IRQ5,
68    AT91RM9200_INT_IRQ6,
69    AT91RM9200_MAX_INT
70} rtems_irq_symbolic_name;
71
72/* vector table used by shared/irq_init.c */
73/* we can treat the AT91RM9200 AIC_SVR_BASE as */
74/* a vector table */
75#define VECTOR_TABLE AIC_SVR_BASE
76                                                                                           
77typedef unsigned char  rtems_irq_level;
78typedef unsigned char  rtems_irq_trigger;
79
80struct  __rtems_irq_connect_data__;     /* forward declaratiuon */
81
82typedef void (*rtems_irq_hdl)       (void);
83typedef void (*rtems_irq_enable)    (const struct __rtems_irq_connect_data__*);
84typedef void (*rtems_irq_disable)   (const struct __rtems_irq_connect_data__*);
85typedef int  (*rtems_irq_is_enabled)(const struct __rtems_irq_connect_data__*);
86
87typedef struct __rtems_irq_connect_data__ {
88    /* IRQ line */
89    rtems_irq_symbolic_name       name;
90
91    /* Handler */
92    rtems_irq_hdl                 hdl;
93
94    /* function for enabling interrupts at device level. */
95    rtems_irq_enable              on;
96
97    /* function for disabling interrupts at device level. */
98    rtems_irq_disable             off;
99
100    /* Function to test if interrupt is enabled */
101    rtems_irq_is_enabled        isOn;
102
103    /* priority level of interrupt */
104    rtems_irq_level               irqLevel;
105
106    /* Trigger method (rising/falling edge or high/low level) */
107    rtems_irq_trigger             irqTrigger;
108} rtems_irq_connect_data;
109
110/*
111 * function to initialize the interrupt for a specific BSP
112 */
113void BSP_rtems_irq_mngt_init();
114
115
116/*
117 * function to connect a particular irq handler.
118 */
119int BSP_install_rtems_irq_handler       (const rtems_irq_connect_data*);
120
121/*
122 * function to get the current RTEMS irq handler for ptr->name.
123 */
124int BSP_get_current_rtems_irq_handler   (rtems_irq_connect_data* ptr);
125
126/*
127 * function to disconnect the RTEMS irq handler for ptr->name.
128 */
129int BSP_remove_rtems_irq_handler        (const rtems_irq_connect_data*);
130
131#endif /* __asm__ */
132
133#ifdef __cplusplus
134}
135#endif
136
137#endif /* __IRQ_H__ */
Note: See TracBrowser for help on using the repository browser.