diff --git a/docs/libraries/built-in/I2C-library.md b/docs/libraries/built-in/I2C-library.md index 4ce4e4bab0..7ff544ad97 100644 --- a/docs/libraries/built-in/I2C-library.md +++ b/docs/libraries/built-in/I2C-library.md @@ -101,14 +101,20 @@ It is also possible to change the default pins used by the `Wire` instance using ### Enable general call mode Available in core version greater than **1.5.0** -Adding `true` as last parameters of the 3 `Wire::begin()` methods will enable the general call mode otherwise `false` per default: +Adding `true` as last parameters of the `Wire::begin()` methods will enable the general call mode otherwise `false` per default: -* `void begin(bool generalCall = false)` -* `void begin(uint8_t, bool generalCall = false)` -* `void begin(int, bool generalCall = false)` +* `void begin(bool generalCall)` +* `void begin(uint8_t address)` (general call disabled) +* `void begin(uint8_t address, bool generalCall, bool NoStretchMode)` +* `void begin(int address, bool generalCall = false, bool NoStretchMode = false)` + +`NoStretchMode` set to `true` disables the clock stretching (slave mode). + +A `uint8_t` address with only the `generalCall` parameter (`Wire.begin(addr, true);`) is handled by the `int` overload. #### Example `Wire.begin(true);` or `Wire.begin(0x70,true);` +`Wire.begin(true);` or `Wire.begin(0x70,true);` ## I2C buffer management By default, I2C buffers are aligned with the Arduino API at **32 bytes**. Transfers of up to **255 bytes** are also possible: diff --git a/libraries/Wire/src/Wire.h b/libraries/Wire/src/Wire.h index bafd3e38b9..6258f9b517 100644 --- a/libraries/Wire/src/Wire.h +++ b/libraries/Wire/src/Wire.h @@ -198,10 +198,9 @@ class TwoWire : public arduino::HardwareI2C { * any other address initializes it as slave using this address. * @param address 7-bit own address for slave mode, 0x01 for master mode. * @param generalCall true to enable the general call address. - * Default: false. - * @param NoStretchMode true to disable clock stretching. Default: false. + * @param NoStretchMode true to disable clock stretching. */ - void begin(uint8_t address, bool generalCall = false, bool NoStretchMode = false); + void begin(uint8_t address, bool generalCall, bool NoStretchMode); /** * @brief Initialize the TWI interface as master or slave. *