This is Unofficial EPICS BASE Doxygen Site
devLibVME.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * EPICS BASE is distributed subject to a Software License Agreement found
7 * in file LICENSE that is included with this distribution.
8 \*************************************************************************/
9 
26 #ifndef INCdevLibh
27 #define INCdevLibh 1
28 
29 #include "dbDefs.h"
30 #include "osdVME.h"
31 #include "errMdef.h"
32 #include "libComAPI.h"
33 #include "devLib.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
40 typedef enum {
48 
50 LIBCOM_API extern const char *epicsAddressTypeName[];
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
56 /*
57  * To retain compatibility include everything by default
58  */
59 #ifndef NO_DEVLIB_COMPAT
60 # include "devLibVMEImpl.h"
61 #endif
62 
63 #ifdef __cplusplus
64 extern "C" {
65 #endif
66 
73 LIBCOM_API long devAddressMap(void);
74 
84 LIBCOM_API long devBusToLocalAddr (
85  epicsAddressType addrType,
86  size_t busAddr,
87  volatile void **ppLocalAddr);
88 
99 LIBCOM_API long devReadProbe (
100  unsigned wordSize, volatile const void *ptr, void *pValueRead);
101 
116 LIBCOM_API long devNoResponseProbe(
117  epicsAddressType addrType,
118  size_t base,
119  size_t size
120 );
121 
132 LIBCOM_API long devWriteProbe (
133  unsigned wordSize, volatile void *ptr, const void *pValueWritten);
134 
149 LIBCOM_API long devRegisterAddress(
150  const char *pOwnerName,
151  epicsAddressType addrType,
152  size_t logicalBaseAddress,
153  size_t size,
154  volatile void **pPhysicalAddress);
155 
165 LIBCOM_API long devUnregisterAddress(
166  epicsAddressType addrType,
167  size_t logicalBaseAddress,
168  const char *pOwnerName);
169 
188 LIBCOM_API long devAllocAddress(
189  const char *pOwnerName,
190  epicsAddressType addrType,
191  size_t size,
192  unsigned alignment, /*n ls bits zero in addr*/
193  volatile void **pLocalAddress);
194 
214 LIBCOM_API long devConnectInterruptVME(
215  unsigned vectorNumber,
216  void (*pFunction)(void *),
217  void *parameter);
218 
232 LIBCOM_API long devDisconnectInterruptVME(
233  unsigned vectorNumber,
234  void (*pFunction)(void *));
235 
243 LIBCOM_API int devInterruptInUseVME (unsigned vectorNumber);
244 
255 LIBCOM_API long devEnableInterruptLevelVME (unsigned level);
256 
268 LIBCOM_API long devDisableInterruptLevelVME (unsigned level);
284 LIBCOM_API void *devLibA24Malloc(size_t size);
285 
294 LIBCOM_API void *devLibA24Calloc(size_t size);
295 
302 LIBCOM_API void devLibA24Free(void *pBlock);
322 LIBCOM_API long devConnectInterruptISA(
323  unsigned interruptLevel,
324  void (*pFunction)(void *),
325  void *parameter);
326 
334 LIBCOM_API long devDisconnectInterruptISA(
335  unsigned interruptLevel,
336  void (*pFunction)(void *));
337 
344 LIBCOM_API int devInterruptLevelInUseISA (unsigned interruptLevel);
345 
351 LIBCOM_API long devEnableInterruptLevelISA (unsigned level);
352 
358 LIBCOM_API long devDisableInterruptLevelISA (unsigned level);
361 #ifndef NO_DEVLIB_OLD_INTERFACE
362 
368 
376 LIBCOM_API long devConnectInterrupt(
377  epicsInterruptType intType,
378  unsigned vectorNumber,
379  void (*pFunction)(void *),
380  void *parameter);
381 
389 LIBCOM_API long devDisconnectInterrupt(
390  epicsInterruptType intType,
391  unsigned vectorNumber,
392  void (*pFunction)(void *));
393 
401 LIBCOM_API long devEnableInterruptLevel(
402  epicsInterruptType intType, unsigned level);
403 
411 LIBCOM_API long devDisableInterruptLevel (
412  epicsInterruptType intType, unsigned level);
413 
420 LIBCOM_API long locationProbe (epicsAddressType addrType, char *pLocation);
421 
424 #endif /* NO_DEVLIB_OLD_INTERFACE */
425 
426 #ifdef __cplusplus
427 }
428 #endif
429 
430 #endif /* INCdevLibh.h*/
LIBCOM_API long devDisconnectInterrupt(epicsInterruptType intType, unsigned vectorNumber, void(*pFunction)(void *))
Definition: devLibVME.c:1023
LIBCOM_API long devDisableInterruptLevel(epicsInterruptType intType, unsigned level)
Definition: devLibVME.c:1080
LIBCOM_API long devAddressMap(void)
Print a map of registered bus addresses.
Definition: devLibVME.c:737
LIBCOM_API long devReadProbe(unsigned wordSize, volatile const void *ptr, void *pValueRead)
Probe the bus for reading from a specific address.
Definition: devLibVME.c:268
VME short I/O.
Definition: devLibVME.h:41
Memory mapped ISA access.
Definition: devLibVME.h:44
LIBCOM_API long devBusToLocalAddr(epicsAddressType addrType, size_t busAddr, volatile void **ppLocalAddr)
Translate a bus address to a pointer the CPU can use.
Definition: devLibVME.c:142
VME extended I/O.
Definition: devLibVME.h:43
epicsAddressType
The available bus address types.
Definition: devLibVME.h:40
LIBCOM_API void * devLibA24Calloc(size_t size)
calloc() for VME drivers that support DMA.
Definition: devLibVME.c:1125
LIBCOM_API long devNoResponseProbe(epicsAddressType addrType, size_t base, size_t size)
Read-probe a range of bus addresses, looking for empty space.
Definition: devLibVME.c:847
Miscellaneous macro definitions.
LIBCOM_API long devWriteProbe(unsigned wordSize, volatile void *ptr, const void *pValueWritten)
Probe the bus for writing to a specific address.
Definition: devLibVME.c:288
LIBCOM_API long devDisconnectInterruptVME(unsigned vectorNumber, void(*pFunction)(void *))
Disconnect an ISR from its VME interrupt vector.
Definition: devLibVME.c:929
LIBCOM_API int devInterruptInUseVME(unsigned vectorNumber)
Determine if a VME interrupt vector is in use.
Definition: devLibVME.c:945
LIBCOM_API long devDisconnectInterruptISA(unsigned interruptLevel, void(*pFunction)(void *))
LIBCOM_API const char * epicsAddressTypeName[]
A string representation of each of the bus address types.
Definition: devLibVME.c:66
LIBCOM_API long locationProbe(epicsAddressType addrType, char *pLocation)
Definition: devLibVME.c:1107
LIBCOM_API long devConnectInterrupt(epicsInterruptType intType, unsigned vectorNumber, void(*pFunction)(void *), void *parameter)
Definition: devLibVME.c:992
LIBCOM_API long devDisableInterruptLevelISA(unsigned level)
Definition: devLibVMEOSD.c:263
LIBCOM_API long devEnableInterruptLevelVME(unsigned level)
Enable a VME interrupt level onto the CPU.
Definition: devLibVME.c:959
LIBCOM_API long devEnableInterruptLevel(epicsInterruptType intType, unsigned level)
Definition: devLibVME.c:1053
VME-64 CR/CSR address space.
Definition: devLibVME.h:45
An interface from devLibVME.c to its OS-specific implementations.
LIBCOM_API long devAllocAddress(const char *pOwnerName, epicsAddressType addrType, size_t size, unsigned alignment, volatile void **pLocalAddress)
Allocate and register an unoccupied address block.
Definition: devLibVME.c:604
LIBCOM_API int devInterruptLevelInUseISA(unsigned interruptLevel)
API for accessing hardware devices, originally over VMEbus.
Invalid, must be the last entry.
Definition: devLibVME.h:46
LIBCOM_API void * devLibA24Malloc(size_t size)
malloc() for VME drivers that support DMA.
Definition: devLibVME.c:1138
LIBCOM_API long devConnectInterruptISA(unsigned interruptLevel, void(*pFunction)(void *), void *parameter)
VME standard I/O.
Definition: devLibVME.h:42
int * base
Definition: flex.c:92
LIBCOM_API long devDisableInterruptLevelVME(unsigned level)
Disable a VME interrupt level.
Definition: devLibVME.c:973
epicsInterruptType
Definition: devLibVME.h:367
LIBCOM_API long devUnregisterAddress(epicsAddressType addrType, size_t logicalBaseAddress, const char *pOwnerName)
Release a bus address range previously registered.
Definition: devLibVME.c:467
LIBCOM_API long devRegisterAddress(const char *pOwnerName, epicsAddressType addrType, size_t logicalBaseAddress, size_t size, volatile void **pPhysicalAddress)
Register a bus address range with a name.
Definition: devLibVME.c:193
LIBCOM_API void devLibA24Free(void *pBlock)
free() for VME drivers that support DMA.
Definition: devLibVME.c:1149
LIBCOM_API long devEnableInterruptLevelISA(unsigned level)
Definition: devLibVMEOSD.c:246
LIBCOM_API long devConnectInterruptVME(unsigned vectorNumber, void(*pFunction)(void *), void *parameter)
Connect an ISR up to a VME interrupt vector.
Definition: devLibVME.c:911