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

Initial vusb console support #8559

Merged
merged 1 commit into from
May 3, 2020
Merged

Conversation

zvecr
Copy link
Member

@zvecr zvecr commented Mar 26, 2020

Description

In a similar effort to #8380, this enables console support for vusb. Given the endpoint limitations, this also has to have mouse/extra disabled for it to work.

Notes

  • Tested on windows && linux with and without hid_listen running

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@zvecr zvecr added the core label Mar 26, 2020
@zvecr zvecr requested a review from a team March 26, 2020 01:28
@zvecr zvecr force-pushed the feature/vusb_console branch 2 times, most recently from edc533c to 93d3e22 Compare March 26, 2020 15:57
@zvecr zvecr marked this pull request as ready for review March 26, 2020 16:18
@zvecr zvecr force-pushed the feature/vusb_console branch 3 times, most recently from e400159 to 5b58a4f Compare March 28, 2020 02:41
@zvecr
Copy link
Member Author

zvecr commented Mar 28, 2020

Rebased and retested now that #8572 has gone in.

Copy link
Member

@tzarc tzarc left a comment

Choose a reason for hiding this comment

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

Working great on coseyfannitutti/mysterium.

@tzarc tzarc requested a review from a team March 28, 2020 03:39
@zvecr zvecr force-pushed the feature/vusb_console branch from 87077ba to 5fde514 Compare March 28, 2020 04:32
@drashna drashna requested a review from a team March 29, 2020 19:56
@fauxpark fauxpark mentioned this pull request Mar 30, 2020
14 tasks
@zvecr zvecr force-pushed the feature/vusb_console branch 2 times, most recently from 9cabdb3 to 6a70243 Compare March 30, 2020 21:09
@zvecr
Copy link
Member Author

zvecr commented Mar 30, 2020

Rebased and retested now that #8380 has gone in.

@yiancar
Copy link
Contributor

yiancar commented Mar 30, 2020

Could we wait a few more days for #8593 to be decided before merging?:)

@zvecr
Copy link
Member Author

zvecr commented Mar 30, 2020

This targets console as its currently implemented. I would rather merge this "as is", given i have already had to rebase this twice due to change in the same area. However if any console endpoint work is merged first, then i will update it to match.

@yiancar
Copy link
Contributor

yiancar commented Mar 30, 2020

I think we should also try to figure out why early logging locks it up as well rather than timer it out if possible.

As soon as #8593 is decided ill try to look into the lock up as well.

It looks to me that CONSOLE_EPSIZE should be 32 to match with the rest.
also at the function sendchar could you try usbSetInterrupt3((void *)&c, sizeof(c)); I know its 1 byte but it makes a lot more sense to have the compiler do it for you.

@zvecr
Copy link
Member Author

zvecr commented Mar 30, 2020

I went with CONSOLE_EPSIZE of 8 to match RAW_EPSIZE introduced in #8380 (comment).

Also with the latest changes, the timer is no longer required.

@yiancar
Copy link
Contributor

yiancar commented Mar 31, 2020

AH got it about CONSOLE_EPSIZE:)

Amazing! thanks mr ring buffer:)

@zvecr zvecr requested review from tzarc and fauxpark March 31, 2020 22:25
@drashna drashna requested review from mechmerlin and yanfali April 5, 2020 08:17
@drashna drashna requested a review from a team April 5, 2020 08:17
@zvecr zvecr force-pushed the feature/vusb_console branch 2 times, most recently from 247590c to 1a7c562 Compare April 6, 2020 22:58
@zvecr zvecr force-pushed the feature/vusb_console branch 2 times, most recently from 23b8277 to f6f110f Compare April 20, 2020 18:44
@tzarc
Copy link
Member

tzarc commented Apr 27, 2020

Seems to work but the ring buffer drops output when it's too long... which is one of the constraints.

e.g.:

*** HID device connected: coseyfannitutti MYSTERIUM (6B62:8769:0001)
  > DEBUG: enabled.
  > Enabling calligraphy mode
  > Disabling repeat mode
    nabled: true
  > Config enabled: false
     WoW repeat mode
    g repeat mode
  > Enabling WoW repeat mode
  > Disabling repeat mode
     WoW repeat mode
    g repeat mode
  > Enabling WoW repeat mode
  > Disabling repeat mode
     WoW repeat mode
    g repeat mode
  > Enabling WoW repeat mode
  > Disabling repeat mode
     WoW repeat mode
    g repeat mode

If that's acceptable, then yeah. Merge away.

@tzarc
Copy link
Member

tzarc commented Apr 27, 2020

Output is specific to qmk_toolbox, hid_listen is A-OK.
image

@zvecr zvecr merged commit 5f82b07 into qmk:master May 3, 2020
violet-fish pushed a commit to violet-fish/qmk_firmware that referenced this pull request May 3, 2020
bitherder pushed a commit to bitherder/qmk_firmware that referenced this pull request May 15, 2020
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request May 24, 2020
sowbug pushed a commit to sowbug/qmk_firmware that referenced this pull request May 24, 2020
fdidron pushed a commit to zsa/qmk_firmware that referenced this pull request Jun 12, 2020
turky pushed a commit to turky/qmk_firmware that referenced this pull request Jun 13, 2020
jakobaa pushed a commit to jakobaa/qmk_firmware that referenced this pull request Jul 7, 2020
sjmacneil pushed a commit to sjmacneil/qmk_firmware that referenced this pull request Feb 19, 2021
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants