Teensy-LC, 'DMAMUX_SOURCE_ADC1' was not declared

Status
Not open for further replies.

ohnoitsaninja

Well-known member
Months ago I used the ADC library without problems with my LC, but on a new computer setup I'm having issues with the installation. I'm using Arduino IDE 1.6.5, Teensyduino 1.26, and I've tried multiple commits of the ADC library, but error trying to compile any of the examples.

I can see 'DMAMUX_SOURCE_ADC1' is supposed to be defined in kinesis.h but it's not seeing it and I don't know why or how to track down what is going wrong.

C:\Program Files (x86)\Arduino\libraries\ADC-master\RingBufferDMA.cpp: In member function 'void RingBufferDMA::start()':
C:\Program Files (x86)\Arduino\libraries\ADC-master\RingBufferDMA.cpp:108:29: error: 'DMAMUX_SOURCE_ADC1' was not declared in this scope
DMAMUX_SOURCE_ADC = DMAMUX_SOURCE_ADC1;

I have tried installing the ADC folder to both C:\Program Files (x86)\Arduino\libraries and C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries

Hopefully an easy fix as I know I had this working before, thanks!
 
Last edited:
Ideally, kinetis.h would define only the names that actually apply to whatever chip you're using.

When we went from Teensy 3.0 to 3.1, I added lots of stuff without any sort of conditionals. So ADC1 was defined for all chips, whether it actually existed or not. Honestly, it was pretty sloppy on my part. Recent changes are improving things. But for code that's using those names without any #ifdef checks, it probably doesn't feel much like an improvement.
 
Status
Not open for further replies.
Back
Top