EPICS Base  7.0.6.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 * SPDX-License-Identifier: EPICS
9 * EPICS BASE is distributed subject to a Software License Agreement found
10 * in file LICENSE that is included with this distribution.
11 \*************************************************************************/
12 
19 #ifndef INCdevLibImplh
20 #define INCdevLibImplh 1
21 
22 #include "dbDefs.h"
23 #include "libComAPI.h"
24 #include "devLib.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
38 typedef struct devLibVME {
40  long (*pDevMapAddr) (epicsAddressType addrType, unsigned options,
41  size_t logicalAddress, size_t size, volatile void **ppPhysicalAddress);
42 
44  long (*pDevReadProbe) (unsigned wordSize, volatile const void *ptr,
45  void *pValueRead);
47  long (*pDevWriteProbe) (unsigned wordSize, volatile void *ptr,
48  const void *pValueWritten);
49 
51  long (*pDevConnectInterruptVME) (unsigned vectorNumber,
52  void (*pFunction)(void *), void *parameter);
54  long (*pDevDisconnectInterruptVME) (unsigned vectorNumber,
55  void (*pFunction)(void *));
56 
58  long (*pDevEnableInterruptLevelVME) (unsigned level);
60  long (*pDevDisableInterruptLevelVME) (unsigned level);
61 
63  void *(*pDevA24Malloc)(size_t nbytes);
65  void (*pDevA24Free)(void *pBlock);
66 
68  long (*pDevInit)(void);
69 
71  int (*pDevInterruptInUseVME)(unsigned vectorNumber);
72 }devLibVME;
73 
75 LIBCOM_API extern devLibVME *pdevLibVME;
76 
77 #ifndef NO_DEVLIB_COMPAT
78 
79 # define pdevLibVirtualOS pdevLibVME
80 
82 #endif
83 
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif /* INCdevLibImplh */
void(* pDevA24Free)(void *pBlock)
Free a block allocated for the VME A24 address space.
Definition: devLibVMEImpl.h:65
int(* pDevInterruptInUseVME)(unsigned vectorNumber)
Check if interrupt vector has an ISR connected.
Definition: devLibVMEImpl.h:71
long(* pDevDisableInterruptLevelVME)(unsigned level)
Disable VME interrupt level to CPU.
Definition: devLibVMEImpl.h:60
devLibVME devLibVirtualOS
A type definition for devLibVME.
Definition: devLibVMEImpl.h:81
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:40
long(* pDevConnectInterruptVME)(unsigned vectorNumber, void(*pFunction)(void *), void *parameter)
Connect ISR to a VME interrupt vector.
Definition: devLibVMEImpl.h:51
long(* pDevWriteProbe)(unsigned wordSize, volatile void *ptr, const void *pValueWritten)
Write a word, detect and protect against bus errors.
Definition: devLibVMEImpl.h:47
long(* pDevInit)(void)
Init devLib.
Definition: devLibVMEImpl.h:68
long(* pDevEnableInterruptLevelVME)(unsigned level)
Enable VME interrupt level to CPU.
Definition: devLibVMEImpl.h:58
long(* pDevDisconnectInterruptVME)(unsigned vectorNumber, void(*pFunction)(void *))
Disconnect ISR from a VME interrupt vector.
Definition: devLibVMEImpl.h:54
Miscellaneous macro definitions.
epicsAddressType
The available bus address types.
Definition: devLibVME.h:41
A table of function pointers for devLibVME implementations.
Definition: devLibVMEImpl.h:38
LIBCOM_API devLibVME * pdevLibVME
Pointer to the entry table used by devLibVME routines.
long(* pDevReadProbe)(unsigned wordSize, volatile const void *ptr, void *pValueRead)
Read a word, detect and protect against bus errors.
Definition: devLibVMEImpl.h:44
API for accessing hardware devices, originally over VMEbus.