[97d0b9b] | 1 | /** |
---|
| 2 | * @file |
---|
| 3 | * |
---|
| 4 | * @ingroup bsp_interrupt |
---|
| 5 | * |
---|
| 6 | * @brief GDB ARM Simulator interrupt support. |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | /* |
---|
| 10 | * Copyright (c) 2008-2012 embedded brains GmbH. All rights reserved. |
---|
| 11 | * |
---|
| 12 | * embedded brains GmbH |
---|
| 13 | * Obere Lagerstr. 30 |
---|
| 14 | * 82178 Puchheim |
---|
| 15 | * Germany |
---|
| 16 | * <rtems@embedded-brains.de> |
---|
| 17 | * |
---|
| 18 | * The license and distribution terms for this file may be |
---|
| 19 | * found in the file LICENSE in this distribution or at |
---|
| 20 | * http://www.rtems.org/license/LICENSE. |
---|
| 21 | */ |
---|
| 22 | |
---|
| 23 | #include <rtems/score/armv4.h> |
---|
| 24 | #include <rtems/score/armv7m.h> |
---|
| 25 | |
---|
| 26 | #include <bsp.h> |
---|
| 27 | #include <bsp/irq.h> |
---|
| 28 | #include <bsp/irq-generic.h> |
---|
| 29 | #include <bsp/linker-symbols.h> |
---|
| 30 | |
---|
[bcc6c70] | 31 | /* |
---|
| 32 | * Prototypes |
---|
| 33 | */ |
---|
| 34 | void lpc24xx_irq_set_priority(rtems_vector_number, unsigned); |
---|
| 35 | unsigned lpc24xx_irq_get_priority(rtems_vector_number); |
---|
| 36 | |
---|
[97d0b9b] | 37 | static inline bool lpc24xx_irq_is_valid(rtems_vector_number vector) |
---|
| 38 | { |
---|
| 39 | return vector <= BSP_INTERRUPT_VECTOR_MAX; |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | void lpc24xx_irq_set_priority(rtems_vector_number vector, unsigned priority) |
---|
| 43 | { |
---|
| 44 | } |
---|
| 45 | |
---|
| 46 | unsigned lpc24xx_irq_get_priority(rtems_vector_number vector) |
---|
| 47 | { |
---|
[bcc6c70] | 48 | return 0; /* bogus value to avoid warning */ |
---|
[97d0b9b] | 49 | } |
---|
| 50 | |
---|
| 51 | #ifdef ARM_MULTILIB_ARCH_V4 |
---|
| 52 | |
---|
| 53 | rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector) |
---|
| 54 | { |
---|
| 55 | return RTEMS_SUCCESSFUL; |
---|
| 56 | } |
---|
| 57 | |
---|
| 58 | rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector) |
---|
| 59 | { |
---|
| 60 | return RTEMS_SUCCESSFUL; |
---|
| 61 | } |
---|
| 62 | |
---|
| 63 | rtems_status_code bsp_interrupt_facility_initialize(void) |
---|
| 64 | { |
---|
| 65 | /* Install the IRQ exception handler */ |
---|
| 66 | _CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, _ARMV4_Exception_interrupt, NULL); |
---|
| 67 | |
---|
| 68 | return RTEMS_SUCCESSFUL; |
---|
| 69 | } |
---|
| 70 | |
---|
| 71 | #endif /* ARM_MULTILIB_ARCH_V4 */ |
---|