/* Sets the active setting of the given interface if the configuration supports it; otherwise, the control pipe is STALLed. If the setting of an interface changes. \parma pDriver Pointer to a USBDDriver instance. \parma infnum Interface number. \parma setting New active setting for the interface.  */
static void SetInterface(USBDDriver *pDriver, unsigned char infnum, unsigned char setting)
/* Sets the active setting of the given interface if the configuration supports it; otherwise, the control pipe is STALLed. If the setting of an interface changes. \parma pDriver Pointer to a USBDDriver instance. \parma infnum Interface number. \parma setting New active setting for the interface.  */
static void SetInterface(USBDDriver *pDriver, unsigned char infnum, unsigned char setting)
{
    if (!pDriver->pInterfaces) {
        USBD_Stall(0);
    }
    else {
        if (pDriver->pInterfaces[infnum] != setting) {
            pDriver->pInterfaces[infnum] = setting;
        }
        USBD_Write(0, 0, 0, 0, 0);
    }
}