source: rtems/c/src/lib/libbsp/sparc/erc32/include/bsp.h @ cfeb191

4.11
Last change on this file since cfeb191 was cfeb191, checked in by Toma Radu <radustoma@…>, on Dec 6, 2013 at 8:52:26 AM

sparc shared: improve doxygen

Add doxygen to the header files in sparc/shared/include directory.

  • Property mode set to 100644
File size: 4.5 KB
Line 
1/**
2 * @file
3 * @ingroup sparc_bsp
4 * @defgroup sparc_erc32 SPARC ERC32
5 * @ingroup sparc_erc32
6 * @brief SPARC ERC32 BSP
7 */
8
9/*  bsp.h
10 *
11 *  This include file contains all SPARC simulator definitions.
12 *
13 *  COPYRIGHT (c) 1989-2007.
14 *  On-Line Applications Research Corporation (OAR).
15 *
16 *  The license and distribution terms for this file may be
17 *  found in the file LICENSE in this distribution or at
18 *  http://www.rtems.com/license/LICENSE.
19 *
20 *  Ported to ERC32 implementation of the SPARC by On-Line Applications
21 *  Research Corporation (OAR) under contract to the European Space
22 *  Agency (ESA).
23 *
24 *  ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
25 *  European Space Agency.
26 */
27
28#ifndef _BSP_H
29#define _BSP_H
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include <bspopts.h>
36#include <bsp/default-initial-extension.h>
37
38#include <rtems.h>
39#include <rtems/iosupp.h>
40#include <erc32.h>
41#include <rtems/clockdrv.h>
42#include <rtems/console.h>
43#include <rtems/irq-extension.h>
44
45/*
46 *  BSP provides its own Idle thread body
47 */
48void *bsp_idle_thread( uintptr_t ignored );
49#define BSP_IDLE_TASK_BODY bsp_idle_thread
50
51/*
52 * Network driver configuration
53 */
54struct rtems_bsdnet_ifconfig;
55extern int rtems_erc32_sonic_driver_attach(
56  struct rtems_bsdnet_ifconfig *config
57);
58#define RTEMS_BSP_NETWORK_DRIVER_NAME   "sonic1"
59#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_erc32_sonic_driver_attach
60
61/* Constants */
62
63/*
64 *  Information placed in the linkcmds file.
65 */
66
67extern int   RAM_START;
68extern int   RAM_END;
69extern int   RAM_SIZE;
70
71extern int   PROM_START;
72extern int   PROM_END;
73extern int   PROM_SIZE;
74
75extern int   CLOCK_SPEED;
76
77extern int   end;        /* last address in the program */
78
79/* functions */
80
81rtems_isr_entry set_vector(                     /* returns old vector */
82    rtems_isr_entry     handler,                /* isr routine        */
83    rtems_vector_number vector,                 /* vector number      */
84    int                 type                    /* RTEMS or RAW intr  */
85);
86
87void BSP_fatal_return( void );
88
89void bsp_spurious_initialize( void );
90
91/* Allocate 8-byte aligned non-freeable pre-malloc() memory. The function
92 * can be called at any time. The work-area will shrink when called before
93 * bsp_work_area_initialize(). malloc() is called to get memory when this function
94 * is called after bsp_work_area_initialize().
95 */
96void *bsp_early_malloc(int size);
97
98/* Interrupt Service Routine (ISR) pointer */
99typedef void (*bsp_shared_isr)(void *arg);
100
101/* Initializes the Shared System Interrupt service */
102extern void BSP_shared_interrupt_init(void);
103
104/* Registers a shared IRQ handler, and enable it at IRQ controller. Multiple
105 * interrupt handlers may use the same IRQ number, all ISRs will be called
106 * when an interrupt on that line is fired.
107 *
108 * Arguments
109 *  irq       System IRQ number
110 *  info      Optional Name of IRQ source
111 *  isr       Function pointer to the ISR
112 *  arg       Second argument to function isr
113 */
114static __inline__ int BSP_shared_interrupt_register
115       (
116       int irq,
117       const char *info,
118       bsp_shared_isr isr,
119       void *arg
120       )
121{
122       return rtems_interrupt_handler_install(irq, info,
123                                       RTEMS_INTERRUPT_SHARED, isr, arg);
124}
125
126/* Unregister previously registered shared IRQ handler.
127 *
128 * Arguments
129 *  irq       System IRQ number
130 *  isr       Function pointer to the ISR
131 *  arg       Second argument to function isr
132 */
133static __inline__ int BSP_shared_interrupt_unregister
134       (
135       int irq,
136       bsp_shared_isr isr,
137       void *arg
138       )
139{
140       return rtems_interrupt_handler_remove(irq, isr, arg);
141}
142
143/* Clear interrupt pending on IRQ controller, this is typically done on a
144 * level triggered interrupt source such as PCI to avoid taking double IRQs.
145 * In such a case the interrupt source must be cleared first on LEON, before
146 * acknowledging the IRQ with this function.
147 *
148 * Arguments
149 *  irq       System IRQ number
150 */
151extern void BSP_shared_interrupt_clear(int irq);
152
153/* Enable Interrupt. This function will unmask the IRQ at the interrupt
154 * controller. This is normally done by _register(). Note that this will
155 * affect all ISRs on this IRQ.
156 *
157 * Arguments
158 *  irq       System IRQ number
159 */
160extern void BSP_shared_interrupt_unmask(int irq);
161
162/* Disable Interrupt. This function will mask one IRQ at the interrupt
163 * controller. This is normally done by _unregister().  Note that this will
164 * affect all ISRs on this IRQ.
165 *
166 * Arguments
167 *  irq         System IRQ number
168 */
169extern void BSP_shared_interrupt_mask(int irq);
170
171#ifdef __cplusplus
172}
173#endif
174
175#endif
Note: See TracBrowser for help on using the repository browser.