Closed
Description
If we could have a global UserSettings.h file which is included at the top of the Arduino.h file we could:
- Let the user add custom settings to an .ino file for libraries and the core itself
- This way we can easily overwrite things like RX_BUFFER_SIZE as well. (without a boards.txt mod)
- We could also add options to disable the USB-Core and other components if not needed
- We could add an option to disable the SerialEvent function. You can keep it by default for compatibility, but set a few parameters to tweak the Arduino code and save some flash
- We could use this for libraries, such as PinChangeInterrupt to effectively make use of direct port access with pre defined pins. This also works for other libraries. A known pin at runtime is way faster and also saves a lot of time.
- Global debug options could be enabled this way.
- Many more things I can imagine of and you as well.
This requires every file to see the UserSettings.h file, it needs to be included in the Arduino.h file and it needs to be placed in the .ino folder, and if not it should be created as an empty file. Also make sure if you delete it, an empty dummy will be added again.
Imported from: arduino/Arduino#3757
Also fixes (and maybe more): arduino/Arduino#3717 arduino/Arduino#3635