|
@@ -40,11 +40,11 @@ TWIBus::TWIBus() {
|
40
|
40
|
Wire.setSCL(pin_t(I2C_SCL_PIN));
|
41
|
41
|
#endif
|
42
|
42
|
|
43
|
|
- Wire.begin(); // No address joins the BUS as the master
|
|
43
|
+ Wire.begin(); // No address joins the BUS as the master
|
44
|
44
|
|
45
|
45
|
#else
|
46
|
46
|
|
47
|
|
- Wire.begin(I2C_SLAVE_ADDRESS); // Join the bus as a slave
|
|
47
|
+ Wire.begin(I2C_SLAVE_ADDRESS); // Join the bus as a slave
|
48
|
48
|
|
49
|
49
|
#endif
|
50
|
50
|
reset();
|
|
@@ -56,9 +56,8 @@ void TWIBus::reset() {
|
56
|
56
|
}
|
57
|
57
|
|
58
|
58
|
void TWIBus::address(const uint8_t adr) {
|
59
|
|
- if (!WITHIN(adr, 8, 127)) {
|
|
59
|
+ if (!WITHIN(adr, 8, 127))
|
60
|
60
|
SERIAL_ECHO_MSG("Bad I2C address (8-127)");
|
61
|
|
- }
|
62
|
61
|
|
63
|
62
|
addr = adr;
|
64
|
63
|
|