Hello,
I would need to customize adc clock divider and sampling rate parameters and, as written in the official wiki, this should be done creating a “special” file named build_opt.h and putting there something like this:
Now, as described in the wiki, when using Arduino IDE, put the file build_opt.h in the sketch folder and you should be done…but…what if one need to do the same thing in PlatformIO?
If you still do want to have it in a file, then as seen here, you can pass a -include <file> as a GCC flag and it will include it as the first line of every compilation unit. Thus you can exactly replicate the build_opt.h behaviour, alas more indirectly.
Thank you @maxgerhardt, I already use build_flags for other definitions, I was not sure it could work also for this case, still, it did work a charm, thank you!