/* Indicates if the device is self-powered when in a given configuration.  */
unsigned char USBConfigurationDescriptor_IsSelfPowered(const USBConfigurationDescriptor *configuration)
/* Indicates if the device is self-powered when in a given configuration.  */
unsigned char USBConfigurationDescriptor_IsSelfPowered(const USBConfigurationDescriptor *configuration)
{
    if ((configuration->bmAttributes & (1 << 6)) != 0) {
        return 1;
    }
    else {
        return 0;
    }
}