Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
SpenceKonde committed Nov 8, 2022
1 parent 6dc361b commit 99b3eca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Changes listed here are checked in to GitHub ("master" branch unless specificall
### 2.6.4 (2.6.3 respin due to critical compile error impacting all sketches)
* Correct compile error encountered in all cases.
* Correct compile error encountered in the SimpleEvent example.
* Add support for configuring the WDT via fuses. These are set on all uploads, but ONLY for non-optiboot boards. To prevent difficulties that may be encoutered when reprogramming. Because of the reliance of Optiboot on the WDT, the WDT must not be forced on when using Optiboot.
* Add support for configuring the WDT via fuses. These are set on all uploads, but ONLY for non-optiboot boards. To prevent difficulties that may be encountered when reprogramming. Because of the reliance of Optiboot on the WDT, the WDT must not be forced on when using Optiboot.
* Correct problems with CI changes.
* Correct issues relating to the fuse configuration set when uploading.

Expand Down
5 changes: 3 additions & 2 deletions megaavr/libraries/Wire/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ Availability of pin mappings by pincount for AVR Dx-series
`Wire.pins(SDA pin, SCL pin)` - this will set the mapping to whichever mapping has the specified pins `SDA` and `SCL`. See API reference below for details. Wire.pins() only supports specifying mapping by pins for the master/slave pins, not the dualmode slave only pins. If you want the mode with the pins that can't do dual mode slave (PA2/3, or PF2/3) but with the alternate slave pins, you MUST use Wire.swap().

## Official specification of I2C
[From NXP, the current owner of the relevant IP](https://www.nxp.com/docs/en/user-guide/UM10204.pdf)
~From NXP, the current owner of the relevant IP~
Thaaat didn't last long did it?

## Overview - I2C, what is it?
I2C (known by many names, see note at end) uses two pins, a clock (SCL) and data (SDA) for communication among two or more compatible devices. This is an open drain bus - external pullup resistors (*which you must include in your design*) keep the two lines HIGH when idle, and devices communicate by driving the pins low or releasing them. Data is clocked on the rising edge (this is a more important detail than usual, as you will see).
Expand Down Expand Up @@ -418,7 +419,7 @@ For an unknown reason, the contactless IR-thermometer MLX90614 is not working ou
I would also suggest testing this with `Wire.specialConfig(0,1,3)` with the default speed (which normally doesn't work). If that fixes it, see if either of those non-zero arguments can be zero'ed out. If the third argument is the key one, see how far you can lower it before it fails (note that this may depend on the physical electronic properties of the bus that determine the rise and fall times). If you do this experiment, please report your results to me so that I can update this section!
At least two of the rewrites of the clock caluculation algorithm that have been submitted, independently, by two different individuals (the second of whom didn't stop there and rewrote the whole library, slashing it's flash footprint while adding functionality) were prompted initially by users trying to get this specific part to work. So - really we're all in debt to this manufacturer, whose combination of compelling hardware saddled with a badly botched I2C interface has led to so much improvement in our Wire library.
At least two of the rewrites of the clock calculation algorithm that have been submitted, independently, by two different individuals (the second of whom didn't stop there and rewrote the whole library, slashing it's flash footprint while adding functionality) were prompted initially by users trying to get this specific part to work. So - really we're all in debt to this manufacturer, whose combination of compelling hardware saddled with a badly botched I2C interface has led to so much improvement in our Wire library.
## Why are there so many names for this protocol?
Wire, TWI (Two Wire Interface), Two Wire, IIC, I2C-compatible, I2C, I<sup>2</sup>C... The reason for this is that I2C (and the explicitly formatted version of it, I<sup>2</sup>C) are trademarked by Phillips (now NXP) which has historically been very litigious, and would go after manufacturers of parts that didn't pay license fees. So devices that could communicate with and which were I2C in all but name proliferated. The last patent expired a while ago, but they still hold the trademarks, so other manufacturers persist in using their names. The actual terms described in the specification claim to cover to all devices that "can" communicate over I2C, and make exception only for FPGAs, where the person programming them also was supposed to get a license. It seems that the litigation wars have cooled somewhat now, though I still would be mighty careful if I was designing microcontrollers. In any event, Atmel always called it TWI, and that tradition was not lost when Microchip purchased them. The original name, I<sup>2</sup>C is a stylization of "IIC", for "Inter-Integrated-Circuit".
Expand Down

0 comments on commit 99b3eca

Please sign in to comment.