I’m having trouble installing a library from github. (GitHub - pedvide/ADC: Teensy 4/3.x/LC ADC implementation)
I use git to manage my project directory, so I don’t want to try and add it to lib/
I saw elsewhere in the community questions, a reference to installing libraries in the “global” scope under ~/.platformio/libs
So, I’ve done that, however when I try to compile my project, one of the ADC library header files is not seeing the Teensy specific defines that it needs…
In file included from .pioenvs/teensy31/ADC/ADC.h:44:0,
from src/main.cpp:5:
.pioenvs/teensy31/ADC/ADC_Module.h:302:2: error: #error "F_BUS must be 108, 60, 56, 54, 48, 40, 36, 24, 4 or 2 MHz"
#error "F_BUS must be 108, 60, 56, 54, 48, 40, 36, 24, 4 or 2 MHz"
I get the same error from my IDE (CLion) and platformio run
.
My hunch is that this library is being pre-compiled, and that step of compilation doesn’t know that this library needs teensy-specific headers?
Should platformio be putting the teensy-specific bits into the compile step automatically, or do I need to do something specific to the ADC library so that platformio knows to bring them in?
Edited to note that Ivan showed this library working correctly when added to the project library under lib/
– PJRC (Teensy) Forum