Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default class driver log level to CFG_TUH/TUD_LOG_LEVEL #2200

Merged
merged 2 commits into from Aug 2, 2023

Conversation

hathach
Copy link
Owner

@hathach hathach commented Aug 2, 2023

Describe the PR

  • allow application to selectively disable usbd/usbh or driver log. The log level is the level where it is logged. To disable it, increase it to level > CFG_TUSB_DEBUG. (kind of counterintuitive). For example to disable device log while workingg on host CFG_TUD_LOG_LEVEL=10
  • also move .codespell to tools (unrelated change)

@tannewt you may need this to troubleshoot host issue while running cpy.

@hathach hathach merged commit 5cf9423 into master Aug 2, 2023
44 checks passed
@hathach hathach deleted the selective-log branch August 2, 2023 09:26
@tannewt
Copy link
Collaborator

tannewt commented Aug 29, 2023

I tried to use this. One sticking point was that setting CFG_TUD_LOG_LEVEL failed to find corresponding macros for the given level. It may be better to pick a specific number to disable them.

@hathach
Copy link
Owner Author

hathach commented Aug 30, 2023

"failed to find corresponding macros" I don't quite understand the issue, can you elaborate a bit. What is your setting for CFG_TUD_LOG_LEVEL and CFG_TUSB_LOG.

@tannewt
Copy link
Collaborator

tannewt commented Sep 21, 2023

Sorry I missed this. I set CFG_TUD_LOG_LEVEL to 10 and it failed to find macros, such as TU_LOG10 for it. I think the STRCAT here is to blame: https://github.com/hathach/tinyusb/blob/master/src/common/tusb_debug.h#L65-L97

@hathach
Copy link
Owner Author

hathach commented Sep 25, 2023

ah yeah, you are right, that is my bad, please try to change CFG_TUD_LOG_LEVEL=3 only now, which the log is able to expanded to. I will try to fix this later on :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants