libpci.c File Reference

#include "libpci.h"
#include "pcidevs.h"

Data Structures

struct  s_pci_product_info
struct  s_pci_vendor_info

Defines

#define VENDOR(vendor, name)   static char __vendorstr_##vendor[] = name;
#define ENDVENDOR()
#define DEVICE(vendor, device, name)   static char __devicestr_##vendor##device[] = name;
#define VENDOR(vendor, name)   static pci_product_info_t __devices_##vendor[] = {
#define ENDVENDOR()   };
#define DEVICE(vendor, device, name)   { 0x##device, __devicestr_##vendor##device },
#define VENDOR(vendor, name)   { 0x##vendor, sizeof(__devices_##vendor) / sizeof(pci_product_info_t), __vendorstr_##vendor, __devices_##vendor },
#define ENDVENDOR()
#define DEVICE(vendor, device, name)
#define VENDORS   (sizeof(pci_vendor_list)/sizeof(pci_vendor_info_t))

Typedefs

typedef s_pci_product_info pci_product_info_t
typedef s_pci_vendor_info pci_vendor_info_t

Functions

const char * pci_vendor_name (pci_vendor_t pci_vendor)
const char * pci_product_name (pci_vendor_t pci_vendor, pci_product_t pci_product)
int pci_devices (paddr_t *list_addr, int *list_size)
int pci_read_reg (pci_tag_t pci_tag, int reg_addr, int bytes, pci_reg_t *value)
int pci_write_reg (pci_tag_t pci_tag, int reg_addr, int bytes, pci_reg_t value)
int pci_find_device (pci_dev_t *device, t_pci_find_fun find_fun)
int pci_map_reg (pci_tag_t pci_tag, int reg_addr)

Variables

static pci_vendor_info_t pci_vendor_list []

Define Documentation

#define DEVICE vendor,
device,
name   ) 
 

#define DEVICE vendor,
device,
name   )     { 0x##device, __devicestr_##vendor##device },
 

#define DEVICE vendor,
device,
name   )     static char __devicestr_##vendor##device[] = name;
 

 
#define ENDVENDOR  ) 
 

 
#define ENDVENDOR  )     };
 

 
#define ENDVENDOR  ) 
 

#define VENDOR vendor,
name   )     { 0x##vendor, sizeof(__devices_##vendor) / sizeof(pci_product_info_t), __vendorstr_##vendor, __devices_##vendor },
 

#define VENDOR vendor,
name   )     static pci_product_info_t __devices_##vendor[] = {
 

#define VENDOR vendor,
name   )     static char __vendorstr_##vendor[] = name;
 

#define VENDORS   (sizeof(pci_vendor_list)/sizeof(pci_vendor_info_t))
 


Typedef Documentation

typedef struct s_pci_product_info pci_product_info_t
 

typedef struct s_pci_vendor_info pci_vendor_info_t
 


Function Documentation

int pci_devices paddr_t list_addr,
int *  list_size
 

int pci_find_device pci_dev_t device,
t_pci_find_fun  find_fun
 

int pci_map_reg pci_tag_t  pci_tag,
int  reg_addr
 

const char* pci_product_name pci_vendor_t  pci_vendor,
pci_product_t  pci_product
 

int pci_read_reg pci_tag_t  pci_tag,
int  reg_addr,
int  bytes,
pci_reg_t value
 

const char* pci_vendor_name pci_vendor_t  pci_vendor  ) 
 

int pci_write_reg pci_tag_t  pci_tag,
int  reg_addr,
int  bytes,
pci_reg_t  value
 


Variable Documentation

pci_vendor_info_t pci_vendor_list[] [static]
 


Generated on Wed May 24 23:06:02 2006 for LSE/OS by  doxygen 1.4.6