source: rtems/bsps/shared/irq/irq-legacy.c @ dea4bbe3

5
Last change on this file since dea4bbe3 was 9b7c456, checked in by Sebastian Huber <sebastian.huber@…>, on Apr 5, 2018 at 4:40:02 AM

bsps: Move generic IRQ support to bsps

This patch is a part of the BSP source reorganization.

Update #3285.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup bsp_interrupt
5 *
6 * @brief Generic BSP interrupt support legacy implementation.
7 */
8
9/*
10 * Copyright (c) 2008, 2009
11 * embedded brains GmbH
12 * Obere Lagerstr. 30
13 * D-82178 Puchheim
14 * Germany
15 * <rtems@embedded-brains.de>
16 *
17 * The license and distribution terms for this file may be
18 * found in the file LICENSE in this distribution or at
19 * http://www.rtems.org/license/LICENSE.
20 */
21
22#include <string.h>
23
24#define BSP_SHARED_HANDLER_SUPPORT
25
26#include <rtems.h>
27#include <rtems/irq.h>
28
29#include <bsp/irq-generic.h>
30
31/**
32 * @deprecated Obsolete.
33 */
34int BSP_get_current_rtems_irq_handler(rtems_irq_connect_data *cd)
35{
36  memset(cd, 0, sizeof(*cd));
37
38  return 1;
39}
40
41/**
42 * @deprecated Use rtems_interrupt_handler_install() instead.
43 */
44int BSP_install_rtems_irq_handler(const rtems_irq_connect_data *cd)
45{
46  rtems_status_code sc = RTEMS_SUCCESSFUL;
47
48  sc = rtems_interrupt_handler_install(
49    cd->name,
50    "LEGACY INSTALLED",
51    RTEMS_INTERRUPT_UNIQUE,
52    cd->hdl,
53    cd->handle
54  );
55  if (sc != RTEMS_SUCCESSFUL) {
56    return 0;
57  }
58
59  if (cd->on != NULL) {
60    cd->on(cd);
61  }
62
63  return 1;
64}
65
66/**
67 * @deprecated Use rtems_interrupt_handler_install() instead.
68 */
69int BSP_install_rtems_shared_irq_handler(const rtems_irq_connect_data *cd)
70{
71  rtems_status_code sc = RTEMS_SUCCESSFUL;
72
73  sc = rtems_interrupt_handler_install(
74    cd->name,
75    "LEGACY INSTALLED",
76    RTEMS_INTERRUPT_SHARED,
77    cd->hdl,
78    cd->handle
79  );
80  if (sc != RTEMS_SUCCESSFUL) {
81    return 0;
82  }
83
84  if (cd->on != NULL) {
85    (*cd->on)(cd);
86  }
87
88  return 1;
89}
90
91/**
92 * @deprecated Use rtems_interrupt_handler_remove() instead.
93 */
94int BSP_remove_rtems_irq_handler(const rtems_irq_connect_data *cd)
95{
96  rtems_status_code sc = RTEMS_SUCCESSFUL;
97
98  if (cd->off != NULL) {
99    (*cd->off)(cd);
100  }
101
102  sc = rtems_interrupt_handler_remove(cd->name, cd->hdl, cd->handle);
103  if (sc != RTEMS_SUCCESSFUL) {
104    return 0;
105  }
106
107  return 1;
108}
109
110/**
111 * @deprecated Use bsp_interrupt_initialize() instead.
112 */
113int BSP_rtems_irq_mngt_set(rtems_irq_global_settings *config)
114{
115  return 0;
116}
117
118/**
119 * @deprecated Obsolete.
120 */
121int BSP_rtems_irq_mngt_get(rtems_irq_global_settings **config)
122{
123  *config = NULL;
124  return 0;
125}
Note: See TracBrowser for help on using the repository browser.