USB Libraries Help > USB Host Libraries > USB Host Layer Library > Library Interface > b) Data Types and Constants > pid Enumeration
MPLAB Harmony USB Stack
pid Enumeration

USB Host Layer TPL Table Entry Matching Criteria flag 

This enumeration defines the possible matching criteria flag that can be specified for a Host TPL table entry. The tplFlag member of the TPL table entry should be set to one or more of these flags. These flags define the criteria that the Host layer will use while matching the attached device to the TPL table entry. For example, if a device is specified by class, subclass and protocol specifying the TPL_FLAG_IGNORE_SUBCLASS flag will cause the Host layer to ignore the subclass while comparing the class, subclass and protocol of the attached device. 

Multiple flags can be specified as a logically OR'ed combination. While combining multiple flags, VID and PID criteria flags cannot be combined with the Class, Subclass, Protocol flags. For example, the TPL_FLAG_VID_PID flag cannot be combined with TPL_FLAG_IGNORE_SUBCLASS.

C
typedef enum {
  initData,
  classCode,
  subClassCode,
  protocolCode
} driver)\ {\ .id.vid_pid = { 0xFFFF, \ .tplFlags.driverType = (TPL_FLAG_CLASS_SUBCLASS_PROTOCOL), \ .tplFlags.ignoreClass = false, \ .tplFlags.ignoreClass = false, \ .tplFlags.ignoreClass = false, \ .hostClientDriverInitData = initData, driver)\ {\ .id.cl_sc_p = { classCode, subClassCode, \ .hostClientDriverInitData = initData, driver)\ {\ .id.cl_sc_p = { classCode, subClassCode, 0xFF }, driver)\ {\ .id.vid_pid = { 0xFFFF, \ .tplFlags.driverType = (TPL_FLAG_CLASS_SUBCLASS_PROTOCOL), \ .tplFlags.ignoreClass = false, \ .tplFlags.ignoreClass = false, \ .tplFlags.ignoreProtocol = true, \ .hostClientDriverInitData = initData, driver)\ {\ .id.cl_sc_p = { classCode, \ .hostClientDriverInitData = initData, driver)\ {\ .id.cl_sc_p = { classCode, 0xFF, 0xFF }, driver)\ {\ .id.vid_pid = { 0xFFFF, \ .tplFlags.driverType = (TPL_FLAG_CLASS_SUBCLASS_PROTOCOL), \ .tplFlags.ignoreClass = false, \ .tplFlags.ignoreProtocol = true, \ .tplFlags.ignoreProtocol = true, \ .hostClientDriverInitData = initData, \ .hostClientDriverInitData = initData, 0xFF, 0xFF, 0xFF }, driver)\ {\ .id.vid_pid = { 0xFFFF, \ .tplFlags.driverType = (TPL_FLAG_CLASS_SUBCLASS_PROTOCOL), \ .tplFlags.ignoreProtocol = true, \ .tplFlags.ignoreProtocol = true, \ .tplFlags.ignoreProtocol = true, \ .hostClientDriverInitData = initData, driver)\ {\ .id.vid_pid = { vid, pid, \ .hostClientDriverInitData = initData, driver)\ {\ .id.vid_pid = { vid, pid }, driver)\ {\ .id.vid_pid = { 0xFFFF, \ .tplFlags.driverType = (TPL_FLAG_VID_PID), \ .tplFlags.ignoreVIDPID = 0, \ .tplFlags.ignoreVIDPID = 0, \ .hostClientDriverInitData = initData, driver)\ {\ .id.vid_pid = { vid, pid, \ .pidMask = mask, \ .hostClientDriverInitData = initData, driver)\ {\ .id.vid_pid = { vid, pid }, \ .pidMask = mask, \ .tplFlags.driverType = (TPL_FLAG_VID_PID), \ .tplFlags.ignoreVIDPID = 1, \ .tplFlags.ignoreVIDPID = 0, \ .hostClientDriverInitData = initData, \ .hostClientDriverInitData = initData, driver)\ {\ .id.vid_pid = { 0xFFFF, 0xFFFF }, \ .pidMask = 0x0000, \ .tplFlags.driverType = (TPL_FLAG_VID_PID), \ .tplFlags.ignoreVIDPID = 1, \ .tplFlags.ignoreVIDPID = 1, \ .hostClientDriverInitData = initData, \ .hostClientDriver = driver\ } typedef struct { union { uint32_t value; struct { uint16_t vid; uint16_t pid; } vid_pid; struct { uint8_t classCode; uint8_t subClassCode; uint8_t protocolCode; } cl_sc_p; } id; uint16_t pidMask; struct { uint8_t driverType :1; uint8_t ignoreClass :1; uint8_t ignoreSubClass :1; uint8_t ignoreProtocol :1; uint8_t pidMasked :1; uint8_t ignoreVIDPID :1; } tplFlags; void * hostClientDriverInitData; void * hostClientDriver; } USB_HOST_TARGET_PERIPHERAL_LIST_ENTRY, USB_HOST_TPL_ENTRY;
Remarks

None.