Generate global macros according to contents of specially named header file in sketch #5084
Labels
arduino-builder
The tool used to handle the Arduino sketch compilation process
arduino-cli
Related to the arduino-cli tool
Component: Compilation
Related to compilation of Arduino sketches
feature request
A request to make an enhancement (not a bug fix)
Type: Duplicate
Another item already exists for this topic
I am here suggesting a possible way of allowing configuring the libraries in a reliable way.
Currently when a library requires configuration, it takes those information either as arguments in the initializer, or build it into the code as
#define
s. The first type is already customizable, but what about the latter, as used in, say, some variant of Ethernet library that can driveW5100
,W5200
andW5500
?I am suggesting the use of an optional
config.h
file. Only#define
s are allowed in this file, and those lines are turned into-D
flags that is present when compiling the entire sketch. This will allow some libraries to be configured at compile time.The text was updated successfully, but these errors were encountered: