libhd  5.0
Macros

Macros to handle device and vendor ids. More...

Macros

#define TAG_PCI   1
 PCI ids. More...
 
#define TAG_EISA   2
 EISA ids (monitors, ISA-PnP, modems, mice etc). More...
 
#define TAG_USB   3
 USB ids. More...
 
#define TAG_SPECIAL   4
 Internally used ids. More...
 
#define TAG_PCMCIA   5
 PCMCIA ids. More...
 
#define TAG_SDIO   6
 SDIO ids. More...
 
#define ID_VALUE(id)   ((id) & 0xffff)
 Get the real id value. More...
 
#define ID_TAG(id)   (((id) >> 16) & 0xf)
 Get the tag value. More...
 
#define MAKE_ID(tag, id_val)   ((tag << 16) | (id_val))
 Combine tag and id value. More...
 

Detailed Description

Macros to handle device and vendor ids.

Example: to check if an id is a pci id and get its value, do something like this:

if(ID_TAG(hd->dev) == TAG_PCI) {
pci_id = ID_VALUE(hd->dev)
}

Macro Definition Documentation

◆ ID_TAG

#define ID_TAG (   id)    (((id) >> 16) & 0xf)

◆ ID_VALUE

#define ID_VALUE (   id)    ((id) & 0xffff)

◆ MAKE_ID

#define MAKE_ID (   tag,
  id_val 
)    ((tag << 16) | (id_val))

◆ TAG_EISA

#define TAG_EISA   2

◆ TAG_PCI

#define TAG_PCI   1

◆ TAG_PCMCIA

#define TAG_PCMCIA   5

PCMCIA ids.

Referenced by hd_scan_xtra(), parse_id(), pcmcia_read_data(), and vend_id2str().

◆ TAG_SDIO

#define TAG_SDIO   6

SDIO ids.

Referenced by hd_read_sdio(), hd_scan_xtra(), and parse_id().

◆ TAG_SPECIAL

#define TAG_SPECIAL   4

◆ TAG_USB

#define TAG_USB   3