blob: 4b84c94bf86aeb5d03db41b40c1a2373dca5add3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/**
* @file
*
* @ingroup bsp_interrupt
*
* @brief LPC24XX interrupt support.
*/
/*
* Copyright (c) 2008-2012 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Obere Lagerstr. 30
* 82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*/
#include <rtems/score/armv4.h>
#include <bsp.h>
#include <bsp/irq.h>
#include <bsp/irq-generic.h>
#include <bsp/lpc24xx.h>
#ifdef ARM_MULTILIB_ARCH_V4
void bsp_interrupt_dispatch(void)
{
/* Read current vector number */
rtems_vector_number vector = VICVectAddr;
/* Enable interrupts in program status register */
uint32_t psr = _ARMV4_Status_irq_enable();
/* Dispatch interrupt handlers */
bsp_interrupt_handler_dispatch(vector);
/* Restore program status register */
_ARMV4_Status_restore(psr);
/* Acknowledge interrupt */
VICVectAddr = 0;
}
#endif /* ARM_MULTILIB_ARCH_V4 */
|