Skip to content

Commit a03e555

Browse files
author
jfpoilpret
committed
Add streams::unitbuf in examples wherever needed to avoid UATX buffer overflow.
1 parent 2c5a2ef commit a03e555

File tree

21 files changed

+21
-15
lines changed

21 files changed

+21
-15
lines changed

examples/i2c/AccelGyro0/AccelGyro0.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ int main()
151151
sei();
152152
uart.begin(115200);
153153
out.width(2);
154-
out << streams::boolalpha;
154+
out << streams::boolalpha << streams::unitbuf;
155155
out << F("Start") << endl;
156156

157157
// Initialize I2C async handler

examples/i2c/AccelGyro1/AccelGyro1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ int main()
170170
sei();
171171
uart.begin(115200);
172172
out.width(2);
173-
out << streams::boolalpha;
173+
out << streams::boolalpha << streams::unitbuf;
174174
out << F("Start") << endl;
175175

176176
// Initialize I2C async handler

examples/i2c/AccelGyro2/AccelGyro2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ int main()
179179
time::delay_ms(5000);
180180
uart.begin(115200);
181181
out.width(2);
182-
out << streams::boolalpha;
182+
out << streams::boolalpha << streams::unitbuf;
183183
out << F("Start") << endl;
184184

185185
// Initialize I2C async handler

examples/i2c/DS1307RTC1/DS1307.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ int main()
190190
ostream out = uart.out();
191191
out.width(0);
192192
out.setf(ios::hex, ios::basefield);
193+
out << streams::boolalpha << streams::unitbuf;
193194
out << "Start" << endl;
194195

195196
// Start TWI interface

examples/i2c/DS1307RTC2/DS1307.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ int main()
190190
#endif
191191
uart.begin(115200);
192192
ostream out = uart.out();
193+
out << streams::boolalpha << streams::unitbuf;
193194
out << F("Start") << endl;
194195

195196
// Start TWI interface

examples/i2c/DS1307RTC3/DS1307.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ int main()
157157
#endif
158158
uart.begin(115200);
159159
ostream out = uart.out();
160-
out << boolalpha;
160+
out << boolalpha << unitbuf;
161161
out << F("Start") << endl;
162162

163163
// Start TWI interface

examples/i2c/DS1307RTC4/DS1307.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ int main()
188188
#endif
189189
uart.begin(115200);
190190
ostream out = uart.out();
191+
out << boolalpha << unitbuf;
191192
out << F("Start") << endl;
192193

193194
// Start TWI interface

examples/i2c/I2CDeviceProto/I2CDeviceProto.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ int main()
8686
DEBUGGER debugger;
8787
MANAGER manager{debugger, debugger};
8888
manager.begin();
89+
out << streams::boolalpha << streams::unitbuf;
8990
out << F("I2C interface started") << endl;
9091

9192
PublicDevice device{manager};

examples/i2c/I2CFakeDevice/I2CFakeDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ int main()
157157
streams::ostream out = uart.out();
158158
uart.begin(115200);
159159
out.width(2);
160-
out << streams::boolalpha;
160+
out << streams::boolalpha << streams::unitbuf;
161161

162162
// Start TWI interface
163163
//====================

examples/i2c/Magneto1/Magneto1.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ int main()
164164

165165
uart.begin(115200);
166166
out.width(2);
167+
out << streams::boolalpha << streams::unitbuf;
167168
out << F("Start\n") << flush;
168169

169170
// Initialize I2C async handler

0 commit comments

Comments
 (0)