Index Index for
Section 9
Index Alphabetical
listing for V
Bottom of page Bottom of
page

vba_get_info(9r)

NAME

vba_get_info - VMEbus: Returns the VMEbus adapter type and characteristics

SYNOPSIS

unsigned_int vba_get_info( struct controller *ctlr );

ARGUMENT

ctlr Specifies a pointer to the VMEbus device's controller data structure.

DESCRIPTION

The vba_get_info() routine returns flags, defined in vbareg.h, that indicate the VMEbus adapter type, whether the adapter supports hardware byte swapping, and whether the system is byte and word I/O capable.

RETURN VALUES

The vba_get_info() routine returns an unsigned integer that can be tested for the following flag values, among others (see vbareg.h for a complete list): _____________________________________________________________________________ Flag Category Value Meaning _____________________________________________________________________________ Adapter type flags VBA_TYPE_VIPVIC VIP/VIC adapter VBA_TYPE_UNIV UNIVERSE II adapter Byte swapping flags VBA_HW_BYTE_SWAP The adapter supports hardware byte swapping VBA_NO_HW_BYTE_SWAP The adapter does not support hardware byte swapping VBA_BW_CAPABLE Byte and word I/O capable flags The system is byte and word I/O capable VBA_NOT_BW_CAPABLE The system is not byte and word I/O capable Error flag -1 The adapter does not support the vba_get_info() routine _____________________________________________________________________________

EXAMPLE

The following code fragment shows a call to the vba_get_info() routine to determine whether hardware byte swapping is supported by the system's VMEbus adapter; if not, a flag is set to indicate that software byte swapping may be required: . . . if ((vba_get_info(ctlr) & VBA_BYTE_SWAP_MSK) == VBA_NO_HW_BYTE_SWAP) dmaex_sw_byte_swap = 1; . . . The driver example chapter of Writing VMEbus Device Drivers shows how the dmaex example driver calls vba_get_info() to test the VMEbus adapter's byte swapping capability. If the adapter cannot perform hardware byte swapping, the user-level code associated with the example driver will perform software byte swapping when needed to fulfill a transfer request. See the example of programming user-level software byte swapping in the driver example chapter.

Index Index for
Section 9
Index Alphabetical
listing for V
Top of page Top of
page