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

Prevent ints from corrupting the read sequence #62

Closed
wants to merge 1 commit into from

Conversation

dhmsjs
Copy link
Contributor

@dhmsjs dhmsjs commented Feb 20, 2017

Enclose the read sequence within an ATOMIC_BLOCK macro to prevent system interrupts from corrupting the value returned by read()

Enclose the read sequence within an ATOMIC_BLOCK macro to prevent system interrupts from corrupting the value returned by read()
@amotl
Copy link
Contributor

amotl commented Feb 17, 2019

Dear @dhmsjs,

we just pushed some amendments to this popular library where we rebundled some pieces which have been loosely floating around here [1]. While being at it, we also cherry-picked one of your commits, thanks again. For more details, please follow the issue referenced above.

As we actually don't have any hardware on our workbench, we will be happy to hear about successful reports from the community running this on a real iron, actually on as much as possible things supported by the Arduino framework. Maybe you can afford some minutes to check whether the status quo works as expected if you still have a MCU and a HX711 breakout around?

We will appreciate your feedback, thanks already.

With kind regards,
Andreas.

[1] https://github.com/hiveeyes/HX711/tree/spring-cleaning

@amotl
Copy link
Contributor

amotl commented Feb 20, 2019

As we already told you that your suggestions have been incorporated into this library, we just wanted to give you appropriate credits, @dhmsjs . Your contributions have been very valuable to account for perfectly valid corner cases most users would never have recognized, don't even imagine fixing them.

While being at it, we added appropriate critical section definitions for other popular Arduino platforms around and also used your well written inline comment as a perfect reference example for explaining things to our little community, see Protect code when accessing shared resources: AVR-specifics.

Thanks again!


As being superseded by merging #123, we might want to close this now.

@dhmsjs
Copy link
Contributor Author

dhmsjs commented Feb 21, 2019

Nice work and thanks for the credits. Closing as suggested -- superseded by #123 Spring Cleaning

@dhmsjs dhmsjs closed this Feb 21, 2019
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.

None yet

2 participants