1.1.9 - Lots of millis/timer enhancements, and a few other things
This change brings a huge number of enhancements and fixes relating to the millis timekeeping functions. Previously, at 20/10/5 MHz, micros() was wrong with TCA0 or TCD0 as millis source (it would undercount, and then jump forward when the interrupt fired), and there was a slow drift on all timekeeping when TCD0 was used. Both were due to integer-math that had not been caught previously. These have been fixed. The timer settings used have been changed for some of the slower clock speeds to improve various parameters on those configurations. Performance of micros() has been slightly improved (mostly back to what it was before the above changes) and micros() now returns the closest time to when it was called possible.
The changes to timer configurations are summarized here in google sheets.
There is now a document included with the core that describes the timers on these parts and how they are used by the core: extras/PWMandTimers.md
This update also brings a few unrelated changes. The EEPROM library has been enhanced to allow writing to the "user row", an extra page of flash that these parts have. When the Servo library was modified to not depend on the TCA0 prescaling, the "trim" duration used to correct for the time taken to call digitalWrite() was not changed to be consistent with this (as an aside, it was also wrong to begin with). The Servo library also now does not use the prescale of 2 when run at 10MHz or less, which should make the output ever-so-slightly smoother with slower clock speeds. The Wire library can now take up to three arguments when used in slave mode; the first is, as always, the slave address, the second is a bool; if true, it will also react to general call messages, and the third is put into the TWI0.SADDRMSK register, which can either act as a second address, or mask off specified bits of the address allowing it to respond to any address that matches the unmasked bits (like how some AT24-series EEPROMs use some of the device address bits as the high bits of the memory address). These new arguments are optional. Finally, the programmer included on the Xplained Pro demo boards is now supported.
This is the version for board manager installation.