USB Libraries Help > USB Host Libraries > USB Hub Host Client Driver Library > Using the Library > How the Library Works > Hub TPL Table Configuration
MPLAB Harmony USB Stack
Hub TPL Table Configuration

The Host Layer attaches the USB Hub Host Client Driver to a Hub device only if the TPL table contains an entry to enable this feature. The driver interface for such a TPL entry should point to USB_HOST_HUB_INTERFACE. The following code shows an example of the TPL entry for the adding Hub support to the application. 

Example:  

/* This code shows an example of how to initialize the TPL table to
 * support a USB Hub Host Client Driver */

#include "usb/usb_host_hub.h"
#include "usb/usb_hub.h"

const USB_HOST_TPL_ENTRY USBTPList[ 2 ] =
{
    TPL_INTERFACE_CLASS_SUBCLASS_PROTOCOL(USB_HUB_CLASS_CODE, 0x00, 0x00, NULL,  USB_HOST_HUB_INTERFACE),

    /* A high-speed hub will report the number of transaction translators in the
     * protocol field. We can ignore this and let the host layer load the hub
     * driver for a high-speed hub */

    TPL_INTERFACE_CLASS (USB_HUB_CLASS_CODE, NULL, USB_HOST_HUB_INTERFACE)
};