Software Library API naibrd 1.62
See all documentation at naii.docs.com
nai_pci.c File Reference
#include "nai_pci.h"
#include "nai_utilities.h"
#include "naibrd_config.h"
#include "naibrd.h"
#include <stdlib.h>
#include <string.h>

Functions

NAIFUNC int32_t NAIAPI nai_PCI_List (int32_t start, int32_t count, int32_t lane, int32_t bus[], int32_t dev[], int32_t func[], uint16_t devid[], uint32_t baseaddr[])
 Retrieves the PCI enumeration information for the PCI boards detected by the NAI controller board.
 
NAIFUNC nai_status_t NAIAPI nai_PCI_Open (nai_pci_handle_t *outhandle, int32_t lane, int32_t bus, int32_t dev, int32_t func, uint16_t devid)
 
NAIFUNC nai_status_t NAIAPI nai_PCI_Close (nai_pci_handle_t handle)
 
NAIFUNC nai_status_t NAIAPI nai_PCI_InstallISR (nai_pci_isr_handle_t *outhandle, nai_pci_handle_t pcihandle, uint32_t vector, nai_isr_t isr, void *param, uint32_t statusaddr, uint32_t clearaddr, uint32_t clearval)
 
NAIFUNC nai_status_t NAIAPI nai_PCI_UninstallISR (nai_pci_isr_handle_t handle)
 
NAIFUNC nai_status_t NAIAPI nai_PCI_ReadReg (nai_pci_handle_t handle, uint32_t addr, uint32_t regwidth, uint32_t *data)
 
NAIFUNC nai_status_t NAIAPI nai_PCI_Block_Read (nai_pci_handle_t handle, uint32_t moduleNum, uint32_t capabilities, uint32_t regwidth, uint32_t addr, uint32_t stride, uint32_t count, uint32_t width, uint64_t *data)
 
NAIFUNC nai_status_t NAIAPI nai_PCI_Block_Write (nai_pci_handle_t handle, uint32_t moduleNum, uint32_t capabilities, uint32_t regwidth, uint32_t addr, uint32_t stride, uint32_t count, uint32_t width, const uint64_t *data)
 
NAIFUNC nai_status_t NAIAPI nai_PCI_WriteReg (nai_pci_handle_t handle, uint32_t addr, uint32_t regwidth, uint32_t data)
 
NAIFUNC nai_status_t NAIAPI nai_PCI_Read (nai_pci_handle_t handle, uint32_t regwidth, uint32_t addr, uint32_t stride, uint32_t count, uint32_t width, void *data)
 
NAIFUNC nai_status_t NAIAPI nai_PCI_Write (nai_pci_handle_t handle, uint32_t regwidth, uint32_t addr, uint32_t stride, uint32_t count, uint32_t width, const void *data)
 
NAIFUNC nai_status_t NAIAPI nai_PCI_GenShrmIRQ (nai_pci_handle_t handle)
 
NAIFUNC nai_status_t NAIAPI nai_PCI_ReadShrm (nai_pci_handle_t handle, uint32_t offset, uint32_t len, void *buf)
 
NAIFUNC nai_status_t NAIAPI nai_PCI_WriteShrm (nai_pci_handle_t handle, uint32_t offset, uint32_t len, void *buf)
 

Function Documentation

◆ nai_PCI_Block_Read()

NAIFUNC nai_status_t NAIAPI nai_PCI_Block_Read ( nai_pci_handle_t handle,
uint32_t moduleNum,
uint32_t capabilities,
uint32_t regwidth,
uint32_t addr,
uint32_t stride,
uint32_t count,
uint32_t width,
uint64_t * data )

◆ nai_PCI_Block_Write()

NAIFUNC nai_status_t NAIAPI nai_PCI_Block_Write ( nai_pci_handle_t handle,
uint32_t moduleNum,
uint32_t capabilities,
uint32_t regwidth,
uint32_t addr,
uint32_t stride,
uint32_t count,
uint32_t width,
const uint64_t * data )

◆ nai_PCI_Close()

NAIFUNC nai_status_t NAIAPI nai_PCI_Close ( nai_pci_handle_t handle)

◆ nai_PCI_GenShrmIRQ()

NAIFUNC nai_status_t NAIAPI nai_PCI_GenShrmIRQ ( nai_pci_handle_t handle)

◆ nai_PCI_InstallISR()

NAIFUNC nai_status_t NAIAPI nai_PCI_InstallISR ( nai_pci_isr_handle_t * outhandle,
nai_pci_handle_t pcihandle,
uint32_t vector,
nai_isr_t isr,
void * param,
uint32_t statusaddr,
uint32_t clearaddr,
uint32_t clearval )

◆ nai_PCI_Open()

NAIFUNC nai_status_t NAIAPI nai_PCI_Open ( nai_pci_handle_t * outhandle,
int32_t lane,
int32_t bus,
int32_t dev,
int32_t func,
uint16_t devid )

◆ nai_PCI_Read()

NAIFUNC nai_status_t NAIAPI nai_PCI_Read ( nai_pci_handle_t handle,
uint32_t regwidth,
uint32_t addr,
uint32_t stride,
uint32_t count,
uint32_t width,
void * data )

◆ nai_PCI_ReadReg()

NAIFUNC nai_status_t NAIAPI nai_PCI_ReadReg ( nai_pci_handle_t handle,
uint32_t addr,
uint32_t regwidth,
uint32_t * data )

◆ nai_PCI_ReadShrm()

NAIFUNC nai_status_t NAIAPI nai_PCI_ReadShrm ( nai_pci_handle_t handle,
uint32_t offset,
uint32_t len,
void * buf )

◆ nai_PCI_UninstallISR()

NAIFUNC nai_status_t NAIAPI nai_PCI_UninstallISR ( nai_pci_isr_handle_t handle)

◆ nai_PCI_Write()

NAIFUNC nai_status_t NAIAPI nai_PCI_Write ( nai_pci_handle_t handle,
uint32_t regwidth,
uint32_t addr,
uint32_t stride,
uint32_t count,
uint32_t width,
const void * data )

◆ nai_PCI_WriteReg()

NAIFUNC nai_status_t NAIAPI nai_PCI_WriteReg ( nai_pci_handle_t handle,
uint32_t addr,
uint32_t regwidth,
uint32_t data )

◆ nai_PCI_WriteShrm()

NAIFUNC nai_status_t NAIAPI nai_PCI_WriteShrm ( nai_pci_handle_t handle,
uint32_t offset,
uint32_t len,
void * buf )