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

Recent interface format changes #51

Closed
kdharbert opened this issue Mar 24, 2020 · 2 comments · Fixed by #56
Closed

Recent interface format changes #51

kdharbert opened this issue Mar 24, 2020 · 2 comments · Fixed by #56
Assignees

Comments

@kdharbert
Copy link

The version of the library has broken some of my code. Most of the issue has been traced to the interface changes mentioned here:
https://forum.pjrc.com/threads/59874-Teensyduino-1-51-errors-on-compile-1-48-does-not-ADC-class-implicated

However, this doesn't solve all the recent problems. I'm presently seeing issues getting measurements to complete. Questions:

This the line I'm using to start conversions. I never calls the interrupt and if I manually read the output after conversions should have been complete the result is always zero.
ADC_ERROR =adc->startSynchronizedContinuous(ANA_PIN0,ANA_PIN1);

I tried this line for a single channel, and it did the same. Interrupt is never called.
//ADC_ERROR =adc->adc0->startContinuous(ANA_PIN0);

I tried this and the output was -70000.
adc0=adc->adc0->analogRead(ANA_PIN0);
Serial.println(adc0);

Obviously something else changed, but I can't tell what.
Is this the correct format to implement the enable interrupts command:
adc-> adc0-> enableInterrupts(adc0_isr);

@KurtE
Copy link
Collaborator

KurtE commented Apr 6, 2020

@pedvide - There has been several people who have posted up on PJRC forum about their programs no longer compile.

I understand you desire to simplify it, but wondering if it would make sense to add back in those methods which took a ADC num as a parameter, and maybe mark them as depreciated?

I have not played much with GCC to know the best way to mark them.

@pedvide
Copy link
Owner

pedvide commented Apr 11, 2020

Hey, yeah it makes sense, I should have done this. I think I can add the methods with a attribute: [[deprecated("Use the adcX-> method instead")]]

@pedvide pedvide self-assigned this Apr 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants