RTEMS 6.3
Loading...
Searching...
No Matches
pci_find_device.c File Reference
#include <rtems/pci.h>
#include <rtems/bspIo.h>
#include <inttypes.h>
#include <stdio.h>

Data Structures

struct  pci_scan_arg_t

Macros

#define PCIB_DEVSIG_BUS(x)
#define PCIB_DEVSIG_DEV(x)
#define PCIB_DEVSIG_FUNC(x)
#define PCIB_DEVSIG_MAKE(b, d, f)

Typedefs

typedef int(*) pci_scan_helper_t(int bus, int dev, int fun, void *uarg)

Functions

void pci_dump (FILE *f)
int pci_find_device (uint16_t vendorid, uint16_t deviceid, int instance, int *bus, int *device, int *function)

Detailed Description

This file implements a BSP independent version of pci_find_device().

Macro Definition Documentation

◆ PCIB_DEVSIG_BUS

#define PCIB_DEVSIG_BUS ( x)
Value:
(((x)>>8) &0xff)

◆ PCIB_DEVSIG_DEV

#define PCIB_DEVSIG_DEV ( x)
Value:
(((x)>>3) & 0x1f)

◆ PCIB_DEVSIG_FUNC

#define PCIB_DEVSIG_FUNC ( x)
Value:
((x) & 0x7)

◆ PCIB_DEVSIG_MAKE

#define PCIB_DEVSIG_MAKE ( b,
d,
f )
Value:
((b<<8)|(d<<3)|(f))