Skip to content

Commit f282f1b

Browse files
committed
Changed SET_WIRE_BUFFERS and GET_WIRE_BUFFERS tpo SET_Wire_BUFFERS
respectively GET_Wire_BUFFERS.
1 parent 7fe8e74 commit f282f1b

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

libraries/Wire/examples/master_reader_custombuffer/master_reader_custombuffer.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ constexpr size_t REQUESTED_BYTE_COUNT = 6;
1919
constexpr size_t RECEIVE_BUFFER_SIZE = REQUESTED_BYTE_COUNT;
2020
constexpr size_t TRANSMIT_BUFFER_SIZE = 0; // There is no transmit in this sketch.
2121

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

2525
void setup() {
@@ -43,7 +43,7 @@ void loop() {
4343
}
4444

4545
void printWireBuffersCapacity(Stream& stream) {
46-
const auto& buffers = GET_WIRE_BUFFERS();
46+
const auto& buffers = GET_Wire_BUFFERS();
4747

4848
stream.print("Wire transmit buffer size is ");
4949
stream.println(buffers.txWireBufferCapacity());

libraries/Wire/examples/master_writer_custombuffer/master_writer_custombuffer.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ static const char text[] = "You really won't believe it, but x is ";
1919
constexpr size_t RECEIVE_BUFFER_SIZE = 0; // There is no receive in this sketch.
2020
constexpr size_t TRANSMIT_BUFFER_SIZE = 42; // Enhance the buffer to 42 characters.
2121

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

2525
void setup() {
@@ -43,7 +43,7 @@ void loop() {
4343
}
4444

4545
void printWireBuffersCapacity(Stream& stream) {
46-
const auto& buffers = GET_WIRE_BUFFERS();
46+
const auto& buffers = GET_Wire_BUFFERS();
4747

4848
stream.print("Wire transmit buffer size is ");
4949
stream.println(buffers.txWireBufferCapacity());

libraries/Wire/examples/slave_receiver_custombuffer/slave_receiver_custombuffer.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
constexpr size_t RECEIVE_BUFFER_SIZE = 42; // Be able receive up to 42 characters in one message.
1717
constexpr size_t TRANSMIT_BUFFER_SIZE = 0; // There is no transmit in this sketch.
1818

19-
SET_WIRE_BUFFERS(RECEIVE_BUFFER_SIZE, TRANSMIT_BUFFER_SIZE,
19+
SET_Wire_BUFFERS(RECEIVE_BUFFER_SIZE, TRANSMIT_BUFFER_SIZE,
2020
false /* no master buffers needed */, true /* slave buffers needed */ );
2121

2222
void setup() {
@@ -49,7 +49,7 @@ void receiveEvent(int howMany) {
4949
}
5050

5151
void printWireBuffersCapacity(Stream& stream) {
52-
const auto& buffers = GET_WIRE_BUFFERS();
52+
const auto& buffers = GET_Wire_BUFFERS();
5353

5454
stream.print("Wire transmit buffer size is ");
5555
stream.println(buffers.txWireBufferCapacity());

libraries/Wire/examples/slave_sender_custombuffer/slave_sender_custombuffer.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ static const char text[] = "hello "; // respond with message of 6 bytes
1818
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

21-
SET_WIRE_BUFFERS(RECEIVE_BUFFER_SIZE, TRANSMIT_BUFFER_SIZE,
21+
SET_Wire_BUFFERS(RECEIVE_BUFFER_SIZE, TRANSMIT_BUFFER_SIZE,
2222
false /* no master buffers needed */, true /* slave buffers needed */ );
2323

2424
void setup() {
@@ -42,7 +42,7 @@ void requestEvent() {
4242
}
4343

4444
void printWireBuffersCapacity(Stream& stream) {
45-
const auto& buffers = GET_WIRE_BUFFERS();
45+
const auto& buffers = GET_Wire_BUFFERS();
4646

4747
stream.print("Wire transmit buffer size is ");
4848
stream.println(buffers.txWireBufferCapacity());

libraries/Wire/src/TwoWireBuffers.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ template<size_t wireNum> struct WireBuffers { // The buffers for the Wire object
116116
static TwoWireBuffers::Interface& instance();
117117
};
118118

119-
#define SET_WIRE_BUFFERS(rxBufferCapacity, txBufferCapacity, enableMaster, enableSlave) \
119+
#define SET_Wire_BUFFERS(rxBufferCapacity, txBufferCapacity, enableMaster, enableSlave) \
120120
template<> TwoWireBuffers::Interface& WireBuffers<0>::instance() { \
121121
static TwoWireBuffers::Impl<rxBufferCapacity, txBufferCapacity, enableMaster, enableSlave> buffers; \
122122
return buffers; \
123123
}
124124

125-
#define GET_WIRE_BUFFERS() \
125+
#define GET_Wire_BUFFERS() \
126126
WireBuffers<0>::instance();
127127

128128
#endif /* TwiBuffers_h */

0 commit comments

Comments
 (0)