DEFINE_HEATER used to take 3 arguments. Today it takes 4. Soon it might
take 5. The transition from 3 to 4 was painful while old config files
had not caught up to the new parameters. Let's avoid the pain again in
the future by making this macro overloadable to accept any correct number
of arguments while doing the right thing. Also let's accept 5 or 6
parameters so new configs will work with today's "older" code.
You can reduce the max. power of each heater.
With the max_pwm value between 1 and 100% you reduce the active pwm.
For example you could reduce the power of your hotend.
My hotend for example is 12V 30W but connected to 24V. So it has
normally 120W. This is very huge. Setting the max_pwm to 25, it has
again ~30W.
Implemented and tested for both platforms. This is quite a big
commit. Unlike with the previous changes to now choosable PWM
frequencies, all board configuration files and Configtool had
to be changed immediately to deal with the additional parameter
in DEFINE_HEATER() and keep AVR builds working (and regression
tests passing).
Also move #defines from heater.c to heater.h
This operation became bigger than expected, because PID handling
hat to be separated from heater handling. Code and strategy wasn't
changed, but some chunks of code had to be moved.