1 | /* vmeintr.c |
---|
2 | * |
---|
3 | * VMEbus support routines for the DMV170. |
---|
4 | * |
---|
5 | * COPYRIGHT (c) 1989-1997. |
---|
6 | * On-Line Applications Research Corporation (OAR). |
---|
7 | * |
---|
8 | * The license and distribution terms for this file may in |
---|
9 | * the file LICENSE in this distribution or at |
---|
10 | * http://www.OARcorp.com/rtems/license.html. |
---|
11 | * |
---|
12 | * $Id$ |
---|
13 | */ |
---|
14 | |
---|
15 | #include <rtems.h> |
---|
16 | #include <bsp.h> |
---|
17 | #include <vmeintr.h> |
---|
18 | |
---|
19 | /* PAGE |
---|
20 | * |
---|
21 | * VME_interrupt_Disable |
---|
22 | * |
---|
23 | * This routine disables vme interupts |
---|
24 | * |
---|
25 | * Input parameters: |
---|
26 | * mask - interupt mask |
---|
27 | * |
---|
28 | * Output parameters: NONE |
---|
29 | * |
---|
30 | * Return values: NONE |
---|
31 | */ |
---|
32 | |
---|
33 | void VME_interrupt_Disable ( |
---|
34 | VME_interrupt_Mask mask /* IN */ |
---|
35 | ) |
---|
36 | { |
---|
37 | volatile rtems_unsigned8 *VME_interrupt_enable; |
---|
38 | rtems_unsigned8 value; |
---|
39 | |
---|
40 | #if 0 |
---|
41 | VME_interrupt_enable = ACC_VIE; |
---|
42 | #else |
---|
43 | VME_interrupt_enable = 0; |
---|
44 | #endif |
---|
45 | value = *VME_interrupt_enable; |
---|
46 | |
---|
47 | value &= ~mask; /* turn off interrupts for all levels in mask */ |
---|
48 | |
---|
49 | *VME_interrupt_enable = value; |
---|
50 | } |
---|
51 | |
---|
52 | /* PAGE |
---|
53 | * |
---|
54 | * VME_interrupt_Enable |
---|
55 | * |
---|
56 | * This routine enables vme interupts |
---|
57 | * |
---|
58 | * Input parameters: |
---|
59 | * mask - interupt mask |
---|
60 | * |
---|
61 | * Output parameters: NONE |
---|
62 | * |
---|
63 | * Return values: |
---|
64 | */ |
---|
65 | |
---|
66 | void VME_interrupt_Enable ( |
---|
67 | VME_interrupt_Mask mask /* IN */ |
---|
68 | ) |
---|
69 | { |
---|
70 | volatile rtems_unsigned8 *VME_interrupt_enable; |
---|
71 | rtems_unsigned8 value; |
---|
72 | |
---|
73 | #if 0 |
---|
74 | VME_interrupt_enable = ACC_VIE; |
---|
75 | #else |
---|
76 | VME_interrupt_enable = 0; |
---|
77 | #endif |
---|
78 | value = *VME_interrupt_enable; |
---|
79 | |
---|
80 | value |= mask; /* turn on interrupts for all levels in mask */ |
---|
81 | |
---|
82 | *VME_interrupt_enable = value; |
---|
83 | } |
---|