source: rtems/c/src/lib/libcpu/bfin/interrupt/interrupt.h @ 2c77cbff

4.104.114.95
Last change on this file since 2c77cbff was 30abd24, checked in by Joel Sherrill <joel.sherrill@…>, on 08/15/08 at 20:18:41

2008-08-15 Allan Hessenflow <allanh@…>

  • ChangeLog?, Makefile.am, README, configure.ac, preinstall.am, cache/cache.c, cache/cache_.h, clock/clock.c, clock/rtc.c, clock/tod.h, include/bf533.h, include/bf537.h, include/cecRegs.h, include/coreTimerRegs.h, include/dmaRegs.h, include/ebiuRegs.h, include/ethernetRegs.h, include/gpioRegs.h, include/memoryRegs.h, include/mmuRegs.h, include/ppiRegs.h, include/rtcRegs.h, include/sicRegs.h, include/spiRegs.h, include/sportRegs.h, include/timerRegs.h, include/twiRegs.h, include/uartRegs.h, include/wdogRegs.h, interrupt/interrupt.c, interrupt/interrupt.h, mmu/mmu.c, mmu/mmu.h, network/ethernet.c, network/ethernet.h, serial/spi.c, serial/spi.h, serial/sport.c, serial/sport.h, serial/twi.c, serial/twi.h, serial/uart.c, serial/uart.h, timer/timer.c: New files.
  • Property mode set to 100644
File size: 2.4 KB
Line 
1/*
2 *  RTEMS support for Blackfin interrupt controller
3 *
4 *  COPYRIGHT (c) 2008 Kallisti Labs, Los Gatos, CA, USA
5 *            written by Allan Hessenflow <allanh@kallisti.com>
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14#ifndef _interrupt_h_
15#define _interrupt_h_
16
17/* Some rules for using this module:
18
19   SIC_IARx registers must not be changed after calling
20   bfin_interrupt_init().
21
22   The bfin_isr structures must stick around for as long as the isr is
23   registered.
24
25   For any interrupt source (SIC bit) that could be shared, it is only
26   safe to disable an ISR through this module if the ultimate source is
27   also disabled (the ultimate source must be disabled prior to disabling
28   it through this module, and must remain disabled until after enabling
29   it through this module).
30
31   For any source that is shared with modules that cannot be disabled,
32   give careful thought to the control of those interrupts.
33   bfin_interrupt_enable_all() or bfin_interrupt_enable_global() can
34   be used to help solve the problems caused by that.
35
36
37   Note that this module does not provide prioritization.  It is assumed
38   that the priorities afforded by the CEC are sufficient.  If finer
39   grained priority control is required then this wlll need to be
40   redesigned.
41*/
42
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48/* source is the source to the SIC (the bit number in SIC_ISR).  isr is
49   the function that will be called when the interrupt is active. */
50typedef struct bfin_isr_s {
51  int source;
52  void (*isr)(int source);
53  /* the following are for internal use only */
54  uint32_t mask;
55  int vector;
56  struct bfin_isr_s *next;
57} bfin_isr_t;
58
59/* If non-default mapping is desired, the BSP should set the SIC_IARx
60   registers prior to calling this. */
61void bfin_interrupt_init(void);
62
63/* ISR starts out disabled */
64void bfin_interrupt_register(bfin_isr_t *isr);
65void bfin_interrupt_unregister(bfin_isr_t *isr);
66
67/* enable/disable specific ISR */
68void bfin_interrupt_enable(bfin_isr_t *isr, boolean enable);
69
70/* atomically enable/disable all ISRs attached to specified source */
71void bfin_interrupt_enable_all(int source, boolean enable);
72
73/* disable a source independently of the individual ISR enables (starts
74   out all enabled) */
75void bfin_interrupt_enable_global(int source, boolean enable);
76 
77#ifdef __cplusplus
78}
79#endif
80
81#endif /* _interrupt_h_ */
82
Note: See TracBrowser for help on using the repository browser.