Skip to content

Commit b010ca5

Browse files
author
Jamie Smith
authored
Change default serial baudrate to 115200 (#58)
1 parent 555345c commit b010ca5

File tree

4 files changed

+13
-32
lines changed

4 files changed

+13
-32
lines changed

drivers/include/drivers/BufferedSerial.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ class BufferedSerial:
6161
* @param tx Transmit pin
6262
* @param rx Receive pin
6363
* @param baud The baud rate of the serial port (optional, defaults to
64-
* MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE)
64+
* MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE, which is set via
65+
* platform.default-serial-baud-rate in mbed_app.json)
6566
*/
6667
BufferedSerial(
6768
PinName tx,
@@ -73,7 +74,8 @@ class BufferedSerial:
7374
* receive pins, with a particular baud rate.
7475
* @param static_pinmap reference to structure which holds static pinmap
7576
* @param baud The baud rate of the serial port (optional, defaults to
76-
* MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE)
77+
* MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE, which is set via
78+
* platform.default-serial-baud-rate in mbed_app.json)
7779
*/
7880
BufferedSerial(
7981
const serial_pinmap_t &static_pinmap,

drivers/include/drivers/SerialBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class SerialBase : private NonCopyable<SerialBase> {
4848
public:
4949
/** Set the baud rate of the serial port
5050
*
51-
* @param baudrate The baudrate of the serial port (default = 9600).
51+
* @param baudrate The baudrate of the serial port (default = platform.default-serial-baud-rate).
5252
*/
5353
void baud(int baudrate);
5454

drivers/include/drivers/UnbufferedSerial.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ class UnbufferedSerial:
5555
*
5656
* @param tx Transmit pin
5757
* @param rx Receive pin
58-
* @param baud The baud rate of the serial port (optional, defaults to MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE)
58+
* @param baud The baud rate of the serial port (optional, defaults to MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE,
59+
* which is set via platform.default-serial-baud-rate in mbed_app.json)
5960
*
6061
* @note
6162
* Either tx or rx may be specified as NC if unused
@@ -70,7 +71,8 @@ class UnbufferedSerial:
7071
* receive pins, with a particular baud rate.
7172
* @param static_pinmap reference to structure which holds static pinmap
7273
* @param baud The baud rate of the serial port (optional, defaults to
73-
* MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE)
74+
* MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE, which is set via
75+
* platform.default-serial-baud-rate in mbed_app.json)
7476
*/
7577
UnbufferedSerial(
7678
const serial_pinmap_t &static_pinmap,

platform/mbed_lib.json

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
"stdio-baud-rate": {
2525
"help": "(Applies if target.console-uart is true.) Baud rate for stdio",
26-
"value": 9600
26+
"value": 115200
2727
},
2828

2929
"stdio-flush-at-exit": {
@@ -33,7 +33,7 @@
3333

3434
"default-serial-baud-rate": {
3535
"help": "Default baud rate for a serial object (if not specified in the constructor)",
36-
"value": 9600
36+
"value": 115200
3737
},
3838

3939
"poll-use-lowpower-timer": {
@@ -170,15 +170,6 @@
170170
"STM": {
171171
"deepsleep-stats-verbose": false
172172
},
173-
"EFM32": {
174-
"stdio-baud-rate": 115200
175-
},
176-
"EFR32": {
177-
"stdio-baud-rate": 115200
178-
},
179-
"UNO_91H": {
180-
"stdio-baud-rate": 115200
181-
},
182173
"DISCO_L475VG_IOT01A": {
183174
"crash-capture-enabled": true,
184175
"fatal-error-auto-reboot-enabled": true
@@ -219,12 +210,6 @@
219210
"crash-capture-enabled": true,
220211
"fatal-error-auto-reboot-enabled": true
221212
},
222-
"NU_PFM_M2351": {
223-
"stdio-baud-rate": 115200
224-
},
225-
"NU_M2354": {
226-
"stdio-baud-rate": 115200
227-
},
228213
"NRF52840_DK": {
229214
"crash-capture-enabled": true,
230215
"fatal-error-auto-reboot-enabled": true
@@ -245,27 +230,19 @@
245230
"crash-capture-enabled": true,
246231
"fatal-error-auto-reboot-enabled": true
247232
},
248-
"S5JS100": {
249-
"stdio-baud-rate": 115200
250-
},
251233
"NUCLEO_L452RE-P": {
252234
"crash-capture-enabled": true,
253235
"fatal-error-auto-reboot-enabled": true
254236
},
255237
"ARM_MUSCA_B1": {
256-
"stdio-convert-newlines": true,
257-
"stdio-baud-rate": 115200
238+
"stdio-convert-newlines": true
258239
},
259240
"ARM_MUSCA_S1": {
260-
"stdio-convert-newlines": true,
261-
"stdio-baud-rate": 115200
241+
"stdio-convert-newlines": true
262242
},
263243
"MTS_DRAGONFLY_L471QG": {
264244
"crash-capture-enabled": true,
265245
"fatal-error-auto-reboot-enabled": true
266-
},
267-
"CY8CKIT064B0S2_4343W": {
268-
"stdio-baud-rate": 115200
269246
}
270247
}
271248
}

0 commit comments

Comments
 (0)