Skip to content

USB Device Descriptor Max Power is not configurable #504

Open
@Props3D

Description

@Props3D

Might make more sense to have logged this as a bug?

Looking at Adafruit_USBD_Device.cpp, there's a define macro for the Max Power but it's never used.

at line 85:

#ifndef USB_CONFIG_POWER
#define USB_CONFIG_POWER 100
#endif

At line 186, the power is hardcoded to 100:

  uint8_t const dev_cfg[sizeof(tusb_desc_configuration_t)] = {
      TUD_CONFIG_DESCRIPTOR(1, 0, 0, sizeof(tusb_desc_configuration_t),
                            TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP | TU_BIT(7),
                            100),
  };

I simply replaced the 100 with USB_CONFIG_POWER.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions