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

Protect from irq? #8

Closed
EduardoG26 opened this issue Jun 11, 2015 · 1 comment
Closed

Protect from irq? #8

EduardoG26 opened this issue Jun 11, 2015 · 1 comment
Labels

Comments

@EduardoG26
Copy link

Hola Pedro. Great work. I have a suggestion.
Could it be helpful to protect read() against IRQ? I think the case when write() is called from inside an irq is very popular. This may corrupt some variables if colliding with read().
Regards. Eduardo

@pedvide
Copy link
Owner

pedvide commented Nov 19, 2016

Sorry for the delay!
I'm not sure what read() function you refer to. Do you mean analogRead()? It's already protected for that. If you call it from an irq and it was already converting, it will stop that conversion, do the irq's conversion and restart the other one when it's done.

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

No branches or pull requests

2 participants