source: rtems/bsps/shared/shmdr/shmdr-intr.c @ 4b28d3c

5
Last change on this file since 4b28d3c was 4b28d3c, checked in by Sebastian Huber <sebastian.huber@…>, on 04/04/18 at 14:39:58

bsps: Move shmdr to bsps

This patch is a part of the BSP source reorganization.

Update #3285.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*  void Shm_Cause_interrupt( node )
2 *
3 *  This routine is the shared memory driver routine which
4 *  generates interrupts to other CPUs.
5 *
6 *  It uses the information placed in the node status control
7 *  block by each node.  For example, when used with the Motorola
8 *  MVME136 board, the MPCSR is used.
9 *
10 *  Input parameters:
11 *    node          - destination of this packet (0 = broadcast)
12 *
13 *  Output parameters: NONE
14 *
15 *  COPYRIGHT (c) 1989-1999.
16 *  On-Line Applications Research Corporation (OAR).
17 *
18 *  The license and distribution terms for this file may be
19 *  found in the file LICENSE in this distribution or at
20 *  http://www.rtems.org/license/LICENSE.
21 */
22
23#include <rtems.h>
24#include "shm_driver.h"
25
26void Shm_Cause_interrupt(
27  uint32_t   node
28)
29{
30  Shm_Interrupt_information *intr;
31  uint8_t    *u8;
32  uint16_t   *u16;
33  uint32_t   *u32;
34  uint32_t    value;
35
36  intr = &Shm_Interrupt_table[node];
37  value = intr->value;
38
39  switch ( intr->length ) {
40    case NO_INTERRUPT:
41       break;
42    case BYTE:
43      u8   = (uint8_t*)intr->address;
44      *u8  = (uint8_t) value;
45      break;
46    case WORD:
47      u16   = (uint16_t*)intr->address;
48      *u16  = (uint16_t) value;
49      break;
50    case LONG:
51      u32   = (uint32_t*)intr->address;
52      *u32  = (uint32_t) value;
53      break;
54  }
55}
Note: See TracBrowser for help on using the repository browser.