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

improve STOP/START handling #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tlyu
Copy link

@tlyu tlyu commented May 31, 2022

Respond immediately when we get a STOP or repeated START while
still selected. Otherwise, a START condition immediately
preceded by a STOP could be missed.

This probably will result in more clock stretching, but the
ATmega firmware doesn't seem to handle retries, so it probably
implicitly depends on the keyscanner doing clock stretching anyway.

Anyway, the ATmega firmware seems to only issue STOPs when reading,
so it's probably not too important in practice. (I only noticed when
trying to do back-to-back LED commands that ended in STOPs.)

Signed-off-by: Taylor Yu [email protected]

@tlyu tlyu mentioned this pull request May 31, 2022
@obra
Copy link
Member

obra commented May 31, 2022

Thanks! I'll want to test this one against a GD32 Model 100 before merge.

Respond immediately when we get a STOP or repeated START while
still selected. Otherwise, a START condition immediately
preceded by a STOP could be missed.

This probably will result in more clock stretching, but the
ATmega firmware doesn't seem to handle retries, so it probably
implicitly depends on the keyscanner doing clock stretching anyway.

Anyway, the ATmega firmware seems to only issue STOPs when reading,
so it's probably not too important in practice. (I only noticed when
trying to do back-to-back LED commands that ended in STOPs.)

Signed-off-by: Taylor Yu <[email protected]>
@tlyu tlyu force-pushed the improve-stop-start branch from 0d15f64 to 6d87871 Compare July 27, 2022 01:09
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.

2 participants