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

PS2_MOUSE_ENABLE ridiculously slows down matrix scan rate #5357

Closed
tomykaira opened this issue Mar 10, 2019 · 1 comment
Closed

PS2_MOUSE_ENABLE ridiculously slows down matrix scan rate #5357

tomykaira opened this issue Mar 10, 2019 · 1 comment

Comments

@tomykaira
Copy link

Describe the Bug

PS2_MOUSE_ENABLE with PS2_USE_INT ridiculously slows down other procedures such as matrix scan.
With rough testing, it seems like matrix scan counts per second decreased to about 1/10.

This is because ps2_host_send() in ps2_interrupt.c uses lots of delay().
Inserting return to the first line of ps2_host_send() solves the problem, but then PS2 mouse does not work, of course.

System Information

  • Keyboard: my own hand made keyboard with X19 trackball
  • Operating system: macOS
  • AVR GCC version: 8.2.0
  • QMK Firmware version: Fork from tag: 0.6.302
  • Any keyboard related software installed? : no

Additional Context

As far as my knowledge goes, the only way to solve the problem is to rewrite ps2_host_send() using timer interrupt instead of delay()s.
I will try it, but it seems hard.

@alex-ong
Copy link
Contributor

Timer interrupt may not be necessary - we could potentially use a time-delta method and call ps2_host_send() every scan?

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

No branches or pull requests

3 participants