source: rtems/c/src/lib/libbsp/sparc/leon3/include/tm27.h @ df217b0b

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

leon3: improve doxygen

Add doxygen to the bsp.h, tm27.h, amba.h and leon.h files

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/**
2 * @file
3 * @ingroup sparc_leon3
4 * @brief Implementations for interrupt mechanisms for Time Test 27
5 */
6
7/*
8 *  tm27.h
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.rtems.com/license/LICENSE.
13 */
14
15#ifndef _RTEMS_TMTEST27
16#error "This is an RTEMS internal file you must not include directly."
17#endif
18
19#ifndef __tm27_h
20#define __tm27_h
21
22/*
23 *  Define the interrupt mechanism for Time Test 27
24 *
25 *  NOTE: Since the interrupt code for the SPARC supports both synchronous
26 *        and asynchronous trap handlers, support for testing with both
27 *        is included.
28 */
29
30#define SIS_USE_SYNCHRONOUS_TRAP  0
31
32/*
33 *  The synchronous trap is an arbitrarily chosen software trap.
34 */
35
36#if (SIS_USE_SYNCHRONOUS_TRAP == 1)
37
38#define TEST_VECTOR SPARC_SYNCHRONOUS_TRAP( 0x90 )
39
40#define MUST_WAIT_FOR_INTERRUPT 1
41
42#define Install_tm27_vector( handler ) \
43  set_vector( (handler), TEST_VECTOR, 1 );
44
45#define Cause_tm27_intr() \
46  __asm__ volatile( "ta 0x10; nop " );
47
48#define Clear_tm27_intr() /* empty */
49
50#define Lower_tm27_intr() /* empty */
51
52/*
53 *  The asynchronous trap is an arbitrarily chosen ERC32 interrupt source.
54 */
55
56#else   /* use a regular asynchronous trap */
57
58#define TEST_INTERRUPT_SOURCE LEON_INTERRUPT_EXTERNAL_1
59#define TEST_VECTOR LEON_TRAP_TYPE( TEST_INTERRUPT_SOURCE )
60#define TEST_INTERRUPT_SOURCE2 LEON_INTERRUPT_EXTERNAL_1+1
61#define TEST_VECTOR2 LEON_TRAP_TYPE( TEST_INTERRUPT_SOURCE2 )
62#define MUST_WAIT_FOR_INTERRUPT 1
63
64#define Install_tm27_vector( handler ) \
65  set_vector( (handler), TEST_VECTOR, 1 ); \
66  set_vector( (handler), TEST_VECTOR2, 1 );
67
68#define Cause_tm27_intr() \
69  do { \
70    LEON_Force_interrupt( TEST_INTERRUPT_SOURCE+(Interrupt_nest>>1)); \
71    nop(); \
72    nop(); \
73    nop(); \
74  } while (0)
75
76#define Clear_tm27_intr() \
77  LEON_Clear_interrupt( TEST_INTERRUPT_SOURCE )
78
79#define Lower_tm27_intr() /* empty */
80
81#endif
82
83#endif
Note: See TracBrowser for help on using the repository browser.