Skip to content

Commit 3d30194

Browse files
committed
Fixed wrong master slave buffer configuration in examples.
1 parent 258e7db commit 3d30194

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

libraries/Wire/examples/master_reader_custombuffer/master_reader_custombuffer.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void setup() {
2626
Wire.begin(); // join I2C bus (address optional for master)
2727
Serial.begin(9600); // start serial for output
2828

29-
// This is just for curiosity and can be removed
29+
// This is just for curiosity and could be removed
3030
printWireBuffersCapacity(Serial);
3131
}
3232

libraries/Wire/examples/master_writer_custombuffer/master_writer_custombuffer.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SET_WIRE_BUFFERS(RECEIVE_BUFFER_SIZE, TRANSMIT_BUFFER_SIZE,
2525
void setup() {
2626
Wire.begin(); // join I2C bus (address optional for master)
2727

28-
// This is just for curiosity and can be removed
28+
// This is just for curiosity and could be removed
2929
Serial.begin(9600); // start serial for output
3030
printWireBuffersCapacity(Serial);
3131
}

libraries/Wire/examples/slave_receiver_custombuffer/slave_receiver_custombuffer.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ constexpr size_t RECEIVE_BUFFER_SIZE = 42; // Be able receive up to 42 characte
1717
constexpr size_t TRANSMIT_BUFFER_SIZE = 0; // There is no transmit in this sketch.
1818

1919
SET_WIRE_BUFFERS(RECEIVE_BUFFER_SIZE, TRANSMIT_BUFFER_SIZE,
20-
true /* master buffers needed */, false /* no slave buffers needed */ );
20+
false /* no master buffers needed */, true /* slave buffers needed */ );
2121

2222
void setup() {
2323
Wire.begin(8); // join I2C bus with address #8
2424
Wire.onReceive(receiveEvent); // register event
2525
Serial.begin(9600); // start serial for output
2626

27-
// This is just for curiosity and can be removed
27+
// This is just for curiosity and could be removed
2828
printWireBuffersCapacity(Serial);
2929
}
3030

libraries/Wire/examples/slave_sender_custombuffer/slave_sender_custombuffer.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ constexpr size_t RECEIVE_BUFFER_SIZE = 0; // There is no receive in this sketch
1919
constexpr size_t TRANSMIT_BUFFER_SIZE = sizeof(text)-1; // Don't need a byte for the \0
2020

2121
SET_WIRE_BUFFERS(RECEIVE_BUFFER_SIZE, TRANSMIT_BUFFER_SIZE,
22-
true /* master buffers needed */, false /* no slave buffers needed */ );
22+
false /* no master buffers needed */, true /* slave buffers needed */ );
2323

2424
void setup() {
2525
Wire.begin(8); // join I2C bus with address #8
2626
Wire.onRequest(requestEvent); // register event
2727

28-
// This is just for curiosity and can be removed
28+
// This is just for curiosity and could be removed
2929
Serial.begin(9600);
3030
printWireBuffersCapacity(Serial);
3131
}

0 commit comments

Comments
 (0)