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

Move serial cache from Canon to port library #856

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RReverser
Copy link
Contributor

I've done this as one of changes in the attempt to ensure re-entrancy, but I figured it's standalone enough to deserve a separate review.

This moves the serial cache (the one that reads a larger chunk to reduce overhead from reading a few bytes at a time) from canon.c to the generic serial port library. The actual cache now lives in the _GPPortPrivateLibrary structure instead of static variables, ensuring that it can't be accidentally modified from competing threads. Additionally, by virtue of being in the generic serial port implementation, the cache logic can now benefit all cameras that communicate over the serial port instead of just a single function in Canon driver.

Note that I don't have any ability to actually test cameras over the serial port so would appreciate another pair of eyes.

@msmeissn msmeissn self-assigned this Oct 31, 2022
@msmeissn
Copy link
Contributor

I will get some serial cameras out of storage to verify it works ;)

@msmeissn
Copy link
Contributor

msmeissn commented Nov 7, 2022

still trying to get my serial setup to work again with he current version. not sure why it does not work currently.

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