Skip to content

Fix press any key responding slowly on espressif #6046

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

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

prplz
Copy link

@prplz prplz commented Feb 17, 2022

On espressif, responding to Press any key to enter the REPL. Use CTRL-D to reload is delayed (for any key other than ctrl+c).

The cause is port_idle_until_interrupt not waking up on any keys pressed. On other ports, a usb interrupt will wake the loop up, but on espressif, this a FreeRTOS task that is awoken upon ctrl+c being received by tinyusb.

My workaround is a little hacky, but shouldn't cause any issues as far as I can tell.

Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised I haven't noticed this myself. The explanation makes sense, though. No testing performed.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for figuring this out! We usually intercept the USB interrupt but, as you said, we don't in this case. This works! I don't think it's hacky. :-)

@tannewt tannewt merged commit ab037bd into adafruit:main Feb 17, 2022
tannewt pushed a commit that referenced this pull request Feb 19, 2022
Some toolchains will have string.h defining various macros which can lead
to compile errors for string function implementations.  Not including
string.h fixes this.

An implementation of __memcpy_chk is provided for toolchains that enable
_FORTIFY_SOURCE.

Fixes issue #6046.

Signed-off-by: Alexey 'alexxy' Shvetsov <[email protected]>
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.

3 participants