EPICS Base
7.0.6.1
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
devLib.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
20
#ifndef EPICSDEVLIB_H
21
#define EPICSDEVLIB_H
22
29
#define devCreateMask(NBITS) ((1<<(NBITS))-1)
30
31
#define devDigToNml(DIGITAL,NBITS) \
32
(((double)(DIGITAL))/devCreateMask(NBITS))
33
34
#define devNmlToDig(NORMAL,NBITS) \
35
(((long)(NORMAL)) * devCreateMask(NBITS))
36
44
#define devCreateAlignmentMask(CTYPE)\
45
(sizeof(CTYPE)>sizeof(double)?sizeof(double)-1:sizeof(CTYPE)-1)
46
50
#define devPtrAlignTest(PTR) (!(devCreateAlignmentMask(*PTR)&(long)(PTR)))
51
57
#define S_dev_success 0
58
59
#define S_dev_vectorInUse (M_devLib| 1)
/*Interrupt vector in use*/
60
61
#define S_dev_vecInstlFail (M_devLib| 2)
/*Interrupt vector install failed*/
62
63
#define S_dev_uknIntType (M_devLib| 3)
/*Unrecognized interrupt type*/
64
65
#define S_dev_vectorNotInUse (M_devLib| 4)
/*Interrupt vector not in use by caller*/
66
67
#define S_dev_badA16 (M_devLib| 5)
/*Invalid VME A16 address*/
68
69
#define S_dev_badA24 (M_devLib| 6)
/*Invalid VME A24 address*/
70
71
#define S_dev_badA32 (M_devLib| 7)
/*Invalid VME A32 address*/
72
73
#define S_dev_uknAddrType (M_devLib| 8)
/*Unrecognized address space type*/
74
75
#define S_dev_addressOverlap (M_devLib| 9)
/*Specified device address overlaps another device*/
76
77
#define S_dev_identifyOverlap (M_devLib| 10)
/*This device already owns the address range*/
78
79
#define S_dev_addrMapFail (M_devLib| 11)
/*Unable to map address*/
80
81
#define S_dev_intDisconnect (M_devLib| 12)
/*Interrupt at vector disconnected from an EPICS device*/
82
83
#define S_dev_internal (M_devLib| 13)
/*Internal failure*/
84
85
#define S_dev_intEnFail (M_devLib| 14)
/*Unable to enable interrupt level*/
86
87
#define S_dev_intDissFail (M_devLib| 15)
/*Unable to disable interrupt level*/
88
89
#define S_dev_noMemory (M_devLib| 16)
/*Memory allocation failed*/
90
91
#define S_dev_addressNotFound (M_devLib| 17)
/*Specified device address unregistered*/
92
93
#define S_dev_noDevice (M_devLib| 18)
/*No device at specified address*/
94
95
#define S_dev_wrongDevice (M_devLib| 19)
/*Wrong device type found at specified address*/
96
97
#define S_dev_badSignalNumber (M_devLib| 20)
/*Signal number (offset) to large*/
98
99
#define S_dev_badSignalCount (M_devLib| 21)
/*Signal count to large*/
100
101
#define S_dev_badRequest (M_devLib| 22)
/*Device does not support requested operation*/
102
103
#define S_dev_highValue (M_devLib| 23)
/*Parameter too high*/
104
105
#define S_dev_lowValue (M_devLib| 24)
/*Parameter too low*/
106
107
#define S_dev_multDevice (M_devLib| 25)
/*Specified address is ambiguous (more than one device responds)*/
108
109
#define S_dev_badSelfTest (M_devLib| 26)
/*Device self test failed*/
110
111
#define S_dev_badInit (M_devLib| 27)
/*Device failed during initialization*/
112
113
#define S_dev_hdwLimit (M_devLib| 28)
/*Input exceeds Hardware Limit*/
114
115
#define S_dev_deviceDoesNotFit (M_devLib| 29)
/*Unable to locate address space for device*/
116
117
#define S_dev_deviceTMO (M_devLib| 30)
/*Device timed out*/
118
119
#define S_dev_badFunction (M_devLib| 31)
/*Bad function pointer*/
120
121
#define S_dev_badVector (M_devLib| 32)
/*Bad interrupt vector*/
122
123
#define S_dev_badArgument (M_devLib| 33)
/*Bad function argument*/
124
125
#define S_dev_badISA (M_devLib| 34)
/*Invalid ISA address*/
126
127
#define S_dev_badCRCSR (M_devLib| 35)
/*Invalid VME CR/CSR address*/
128
129
#define S_dev_vxWorksIntEnFail S_dev_intEnFail
130
132
#endif
/* EPICSDEVLIB_H */
133
134
/*
135
* Retain compatibility by including VME by default
136
*/
137
#ifndef NO_DEVLIB_COMPAT
138
# include "
devLibVME.h
"
139
#endif
devLibVME.h
API for accessing hardware devices, mosty over VMEbus.
Generated on Wed Oct 6 2021 20:58:13 for EPICS Base by
1.8.5