rust-osdev / rust-osdev/ps2-mouse

Don't use callback functions

Open
#4 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
14
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Using callback functions can be complicated and inflexible. I think the way pc-keybaord does it is much better, where you give it a u8 and it will return an Option with the decoded event. https://docs.rs/pc-keyboard/0.8.0/pc_keyboard/struct.Keyboard.html#method.add_byte

I can make a PR for this.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing ps2-mouse input API and comparing its callback model with pc-keyboard 0.8.0's Keyboard::add_byte behavior. Determine the public API and event-decoding changes needed so callers provide a u8 and receive an Option containing the decoded event; done means the callback approach is replaced consistently and the library's tests or examples pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
embedded-iot
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.