Commit ea45d28
committed
SSD1306: Disambiguate Wire.begin for [email protected]
With [email protected] we can't pass the first argument to TwoWire::begin as an unsigned int; it will resolve the four-parameter overload and initialize the bus in slave mode.
We resolve the three-parameter overload for bus master mode by explicitly typing the first and third arguments, the third replacing the call to TwoWire::setClock.
Setting the frequency in TwoWire::begin has the same effect as ::setClock:
arduino-esp32@<2.0.1: i2cInit (esp32-hal-i2c.c) and setClock (Wire.cpp) both call i2cSetFrequency (esp32-hal-i2c.c)
[email protected]: esp-idf does the same clock selection in i2c_param_config and i2c_get_clk_src (driver/i2c.c) that arduino-esp32 does in i2cSetClock (esp32-hal-i2c.c).1 parent 494d6b9 commit ea45d28
1 file changed
+10
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
0 commit comments