devLib.h

API for accessing hardware devices, originally over VMEbus.

Support for allocation of common device resources

Author

Marty Kraimer and Jeff Hill

Macros for normalizing values

Warning

Deprecated, we don’t know of any code currently using these.

devCreateMask(NBITS)

Create a bit mask for a given number of bits.

devDigToNml(DIGITAL, NBITS)

Normalize a raw integer value and convert it to type double.

devNmlToDig(NORMAL, NBITS)

Convert a normalized value to a raw integer.

Macros for pointer alignment

Warning

Deprecated, we don’t know of any code currently using these.

devCreateAlignmentMask(CTYPE)

Create an alignment mask for CTYPE.

devPtrAlignTest(PTR)

Check Pointer alignment, returns true if the pointer PTR is suitably aligned for its data type.

Error status values returned by devLib routines

S_dev_success
S_dev_vectorInUse

Interrupt vector in use.

S_dev_vecInstlFail

Interrupt vector install failed.

S_dev_uknIntType

Unrecognized interrupt type.

S_dev_vectorNotInUse

Interrupt vector not in use by caller.

S_dev_badA16

Invalid VME A16 address.

S_dev_badA24

Invalid VME A24 address.

S_dev_badA32

Invalid VME A32 address.

S_dev_uknAddrType

Unrecognized address space type.

S_dev_addressOverlap

Specified device address overlaps another device.

S_dev_identifyOverlap

This device already owns the address range.

S_dev_addrMapFail

Unable to map address.

S_dev_intDisconnect

Interrupt at vector disconnected from an EPICS device.

S_dev_internal

Internal failure.

S_dev_intEnFail

Unable to enable interrupt level.

S_dev_intDissFail

Unable to disable interrupt level.

S_dev_noMemory

Memory allocation failed.

S_dev_addressNotFound

Specified device address unregistered.

S_dev_noDevice

No device at specified address.

S_dev_wrongDevice

Wrong device type found at specified address.

S_dev_badSignalNumber

Signal number (offset) to large.

S_dev_badSignalCount

Signal count to large.

S_dev_badRequest

Device does not support requested operation.

S_dev_highValue

Parameter too high.

S_dev_lowValue

Parameter too low.

S_dev_multDevice

Specified address is ambiguous (more than one device responds)

S_dev_badSelfTest

Device self test failed.

S_dev_badInit

Device failed during initialization.

S_dev_hdwLimit

Input exceeds Hardware Limit.

S_dev_deviceDoesNotFit

Unable to locate address space for device.

S_dev_deviceTMO

Device timed out.

S_dev_badFunction

Bad function pointer.

S_dev_badVector

Bad interrupt vector.

S_dev_badArgument

Bad function argument.

S_dev_badISA

Invalid ISA address.

S_dev_badCRCSR

Invalid VME CR/CSR address.

S_dev_vxWorksIntEnFail

Synonym for S_dev_intEnFail.