Skip to content

Macro required for pico/usb_reset_tusb.h but only inside another header #3292

Open

Description

@lexcibien
In file included from /Users/dev_remofer/github/projects/h_shifter_firmware/src/usb/usb_descriptors.c:5:
/Users/dev_remofer/github/projects/h_shifter_firmware/src/usb/usb_descriptors.c:111:3: error: 'RESET_INTERFACE_SUBCLASS' undeclared here (not in a function)
  111 |   TUD_RPI_RESET_DESCRIPTOR(ITF_NUM_RESET, 0),
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/dev_remofer/github/projects/h_shifter_firmware/src/usb/usb_descriptors.c:111:3: error: 'RESET_INTERFACE_PROTOCOL' undeclared here (not in a function)
  111 |   TUD_RPI_RESET_DESCRIPTOR(ITF_NUM_RESET, 0),
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.

Inside header pico/usb_reset_tusb.h it needs two macros: RESET_INTERFACE_SUBCLASS and RESET_INTERFACE_PROTOCOL.
Adding pico/usb_reset_interface.h to code solves this issue. But clang warns about this header not being used directly. Probably could be added inside pico/usb_reset_tusb because in my code other than TUD_RPI_RESET_DESCRIPTOR, I don't use it for nothing more. The image below shows the warning.

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions