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

enableInterrupts API changed: adc->enableInterrupts(adc0_isr, ADC_0); #47

Closed
KurtE opened this issue Dec 31, 2019 · 2 comments
Closed
Assignees
Labels

Comments

@KurtE
Copy link
Collaborator

KurtE commented Dec 31, 2019

Many of the examples still have in them calls like:

adc->enableInterrupts(adc0_isr, ADC_0);
adc->enableInterrupts(adc1_isr, ADC_1);

Which does not work properly as you now have another parameter for Interrupt priority.
So for example the second call below still sets interrupts on ADC_0 at priority 1.

@pedvide pedvide self-assigned this Jan 8, 2020
@pedvide pedvide added the bug label Jan 8, 2020
@pedvide
Copy link
Owner

pedvide commented Jan 8, 2020

You are right! Thanks for finding this!
I have changed the ADC API (PR #49 ) to delete all methods that require the adc_num. Those methods should be accessed directly with adc->adcX->method(...), instead of adc->method(..., adc_num).

Methods like analogRead can be used with either syntax because if you don´t provide the adc_num they will find the right adc to use anyways.

What do you think?

@pedvide
Copy link
Owner

pedvide commented Jan 18, 2020

Fixed with PR #49. Thanks!

@pedvide pedvide closed this as completed Jan 18, 2020
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