Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
Board Connection - PCI Setup Functions

Functions

NAIBRDFUNC int32_t NAIAPI naibrd_GetPCIList (int32_t lane, int32_t listLen, int32_t *p_outbus, int32_t *p_outdev, int32_t *p_outfunc, uint16_t *p_outdevid, naibsp_vaddr_t *p_outbaseaddr)
 Retrieves the PCI enumeration information for the PCI boards detected by the NAI controller board.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SetBusDev (int32_t cardIndex, int16_t lane, int16_t bus, int16_t dev, int16_t func)
 Sets the lane, bus, dev, and func to connect to when using naibrd_comm_t comm type: NAIBRD_COMM_PCI.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetBusDev (int32_t cardIndex, int32_t *p_outlane, int32_t *p_outbus, int32_t *p_outdev, int32_t *p_outfunc)
 Retrieves the lane, bus, dev, and func to connect to when using naibrd_comm_t comm type: NAIBRD_COMM_PCI.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_GetOffbrdLane (int32_t cardIndex, int32_t *p_outlane)
 Retrieves the off-board lane to use. The off-board lane that is used is processor dependent.
 
NAIBRDFUNC const char *NAIAPI naibrd_GetDeviceName (uint16_t id)
 Returns the Device Name associated with the Device Code passed in.
 
NAIBRDFUNC const char *NAIAPI naibrd_GetDeviceNameIndex (uint16_t devcode, uint32_t cardIndex)
 Returns the Device Name associated with the Device Code passed in. Only needed when devID is 0x6881, for mb 68DT1, 68CB6, or 68G5.
 

Detailed Description

Function Documentation

◆ naibrd_GetBusDev()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetBusDev ( int32_t cardIndex,
int32_t * p_outlane,
int32_t * p_outbus,
int32_t * p_outdev,
int32_t * p_outfunc )

Retrieves the lane, bus, dev, and func to connect to when using naibrd_comm_t comm type: NAIBRD_COMM_PCI.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
p_outlane: (Output) PCI lane number.
p_outbus: (Output) PCI bus number.
p_outdev: (Output) PCI device number.
p_outfunc: (Output) PCI function number.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.

◆ naibrd_GetDeviceName()

NAIBRDFUNC const char *NAIAPI naibrd_GetDeviceName ( uint16_t id)

Returns the Device Name associated with the Device Code passed in.

Parameters
id: (Input) Device Code.
Returns
  • Device Name or "UNKNOWN" if the Device Code passed in is not recognized.

◆ naibrd_GetDeviceNameIndex()

NAIBRDFUNC const char *NAIAPI naibrd_GetDeviceNameIndex ( uint16_t devcode,
uint32_t cardIndex )

Returns the Device Name associated with the Device Code passed in. Only needed when devID is 0x6881, for mb 68DT1, 68CB6, or 68G5.

Parameters
devcode: (Input) The Device Code.
cardIndex: (Input) The card index of the board.
Returns
  • Device Name or "UNKNOWN" if the Device Code passed in is not recognized.

◆ naibrd_GetOffbrdLane()

NAIBRDFUNC nai_status_t NAIAPI naibrd_GetOffbrdLane ( int32_t cardIndex,
int32_t * p_outlane )

Retrieves the off-board lane to use. The off-board lane that is used is processor dependent.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
p_outlane: (Output) PCI lane number.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.

◆ naibrd_GetPCIList()

NAIBRDFUNC int32_t NAIAPI naibrd_GetPCIList ( int32_t lane,
int32_t listLen,
int32_t * p_outbus,
int32_t * p_outdev,
int32_t * p_outfunc,
uint16_t * p_outdevid,
naibsp_vaddr_t * p_outbaseaddr )

Retrieves the PCI enumeration information for the PCI boards detected by the NAI controller board.

Parameters
lane: (Input) PCIe Backplane Lane Number.
listLen: (Input) Length or maximum number of PCI boards allocated in arrays for the bus, dev, func, devid, and base address outputs.
p_outbus: (Output) Array of the PCI Bus Location for detected PCI boards.
p_outdev: (Output) Array of the PCI Device Location for detected PCI boards.
p_outfunc: (Output) Array of the PCI Function Location for detected PCI boards.
p_outdevid: (Output) Array of the Device ID for detected PCI boards.
p_outbaseaddr: (Output) Array of the Base Address Value for detected PCI boards.
Returns
  • The number of NAI boards that have been detected.

◆ naibrd_SetBusDev()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SetBusDev ( int32_t cardIndex,
int16_t lane,
int16_t bus,
int16_t dev,
int16_t func )

Sets the lane, bus, dev, and func to connect to when using naibrd_comm_t comm type: NAIBRD_COMM_PCI.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
lane: (Input) PCI lane number.
bus: (Input) PCI bus number.
dev: (Input) PCI device number.
func: (Input) PCI function number.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.