Is your feature request related to a problem? Please describe.
It's not possible to easily override tusb_option.h settings such as CFG_TUD_HID by using compile-time options. The header files in the src/arduino/ports directory unconditionally define the option macros. This means that overriding them requires replacing the port header, or at least specifying a custom config header using -DCFG_TUSB_CONFIG_FILE=.
Describe the solution you'd like
The port headers should allow settings such as CFG_TUD_HID to be overridden using compiler flags. tusb_option.h itself uses #ifndef to create defaults that can be overridden. The port headers should also do this.
Describe alternatives you've considered
I've considered the custom config header described above.
Additional context
I have a need for supporting at least 3 HID interfaces on nRF52840, while CFG_TUD_HID defaults to 2.
Is your feature request related to a problem? Please describe.
It's not possible to easily override
tusb_option.h
settings such asCFG_TUD_HID
by using compile-time options. The header files in thesrc/arduino/ports
directory unconditionally define the option macros. This means that overriding them requires replacing the port header, or at least specifying a custom config header using-DCFG_TUSB_CONFIG_FILE=
.Describe the solution you'd like
The port headers should allow settings such as
CFG_TUD_HID
to be overridden using compiler flags.tusb_option.h
itself uses#ifndef
to create defaults that can be overridden. The port headers should also do this.Describe alternatives you've considered
I've considered the custom config header described above.
Additional context
I have a need for supporting at least 3 HID interfaces on nRF52840, while
CFG_TUD_HID
defaults to 2.