This is Unofficial EPICS BASE Doxygen Site
devLibVMEImpl.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2010 Brookhaven Science Associates, as Operator of
3 * Brookhaven National Laboratory.
4 * Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
5 * National Laboratory.
6 * Copyright (c) 2002 The Regents of the University of California, as
7 * Operator of Los Alamos National Laboratory.
8 * EPICS BASE is distributed subject to a Software License Agreement found
9 * in file LICENSE that is included with this distribution.
10 \*************************************************************************/
11 
18 #ifndef INCdevLibImplh
19 #define INCdevLibImplh 1
20 
21 #include "dbDefs.h"
22 #include "libComAPI.h"
23 #include "devLib.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
37 typedef struct devLibVME {
39  long (*pDevMapAddr) (epicsAddressType addrType, unsigned options,
40  size_t logicalAddress, size_t size, volatile void **ppPhysicalAddress);
41 
43  long (*pDevReadProbe) (unsigned wordSize, volatile const void *ptr,
44  void *pValueRead);
46  long (*pDevWriteProbe) (unsigned wordSize, volatile void *ptr,
47  const void *pValueWritten);
48 
50  long (*pDevConnectInterruptVME) (unsigned vectorNumber,
51  void (*pFunction)(void *), void *parameter);
53  long (*pDevDisconnectInterruptVME) (unsigned vectorNumber,
54  void (*pFunction)(void *));
55 
57  long (*pDevEnableInterruptLevelVME) (unsigned level);
59  long (*pDevDisableInterruptLevelVME) (unsigned level);
60 
62  void *(*pDevA24Malloc)(size_t nbytes);
64  void (*pDevA24Free)(void *pBlock);
65 
67  long (*pDevInit)(void);
68 
70  int (*pDevInterruptInUseVME)(unsigned vectorNumber);
71 }devLibVME;
72 
74 LIBCOM_API extern devLibVME *pdevLibVME;
75 
76 #ifndef NO_DEVLIB_COMPAT
77 
78 # define pdevLibVirtualOS pdevLibVME
79 
81 #endif
82 
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
88 #endif /* INCdevLibImplh */
long(* pDevInit)(void)
Init devLib.
Definition: devLibVMEImpl.h:67
long(* pDevEnableInterruptLevelVME)(unsigned level)
Enable VME interrupt level to CPU.
Definition: devLibVMEImpl.h:57
long(* pDevDisconnectInterruptVME)(unsigned vectorNumber, void(*pFunction)(void *))
Disconnect ISR from a VME interrupt vector.
Definition: devLibVMEImpl.h:53
devLibVME devLibVirtualOS
A type definition for devLibVME.
Definition: devLibVMEImpl.h:80
epicsAddressType
The available bus address types.
Definition: devLibVME.h:40
long(* pDevMapAddr)(epicsAddressType addrType, unsigned options, size_t logicalAddress, size_t size, volatile void **ppPhysicalAddress)
Map a bus address to the CPU's address space.
Definition: devLibVMEImpl.h:39
Miscellaneous macro definitions.
struct devLibVME devLibVME
A table of function pointers for devLibVME implementations.
int(* pDevInterruptInUseVME)(unsigned vectorNumber)
Check if interrupt vector has an ISR connected.
Definition: devLibVMEImpl.h:70
long(* pDevConnectInterruptVME)(unsigned vectorNumber, void(*pFunction)(void *), void *parameter)
Connect ISR to a VME interrupt vector.
Definition: devLibVMEImpl.h:50
LIBCOM_API devLibVME * pdevLibVME
Pointer to the entry table used by devLibVME routines.
Definition: devLibVMEOSD.c:12
void(* pDevA24Free)(void *pBlock)
Free a block allocated for the VME A24 address space.
Definition: devLibVMEImpl.h:64
long(* pDevDisableInterruptLevelVME)(unsigned level)
Disable VME interrupt level to CPU.
Definition: devLibVMEImpl.h:59
API for accessing hardware devices, originally over VMEbus.
long(* pDevReadProbe)(unsigned wordSize, volatile const void *ptr, void *pValueRead)
Read a word, detect and protect against bus errors.
Definition: devLibVMEImpl.h:43
A table of function pointers for devLibVME implementations.
Definition: devLibVMEImpl.h:37
long(* pDevWriteProbe)(unsigned wordSize, volatile void *ptr, const void *pValueWritten)
Write a word, detect and protect against bus errors.
Definition: devLibVMEImpl.h:46