Obtain socket information from the devp-pccard server
#include <sys/pccard.h> int pccard_info( pccard_t handle, int socket, struct _pccard_info* info, unsigned size );
libpccard
Use the -l pccard option to qcc to link against this library.
The pccard_info() function call retrieves socket setup information from the devp-pccard server. The information is returned in the _pccard_info structure.
The _pccard_info structure is defined in <pccard.h> as:
struct _pccard_info { int16_t socket; // Socket number (0 based) uint16_t status; // Card status (from socket services spec) uint32_t flags; // Flags (_PCCARD_FLAG_*) uint8_t vcc; // Current Vcc (in tenths of volts) uint8_t vpp; // Current Vpp (in tenths of volts) uint8_t num_windows; // Number of windows described below uint8_t index; // Index for CardBus devices uint16_t manufacturer; // Manufacturer ID from PCCARD uint16_t card_type; // Card Type from PCCARD uint16_t device_id; // CardBus device id uint16_t vendor_id; // CardBus vendor id uint16_t busnum; // PCI bus number uint16_t devfuncnum; // PCI device and function number struct _pccard_window { uint16_t window; // Window type (_PCCARD_WINDOW_*) uint16_t flags; // Window flags (_PCCARD_WINFLAG_*) mpid_t pid; // Locking pid uint16_t device; // Device type (_PCCARD_DEV_*) uint16_t dummy; uint32_t dev_size; // Size of memory device uint32_t reserved3; union { struct _pccard_irq { uint16_t flags; // (_PCCARD_IRQFLAG_*) uint16_t irq; } irq; struct _pccard_memio { uint32_t base; // Base address (in host address space) uint32_t size; // Size of window uint32_t offset; // offset of region from base of card uint16_t flags; // (_PCCARD_MEMIOFLAG_*) uint16_t dummy2; } memio; } un; } window[_PCCARD_MAX_WINDOWS]; };
See pccard_arm().
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
pccard_arm(), pccard_attach(), pccard_detach(), pccard_lock(), pccard_raw_read(), pccard_unlock()