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

4.115
Last change on this file since 25026906 was 25026906, checked in by Toma Radu <radustoma@…>, on 12/04/13 at 20:45:12

erc32: improve doxygen

Add doxygen to the bsp.h, tm27.h, erc32.h and irq.h files.

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