-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consistent default serial baud #2398
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,10 +26,11 @@ SerialBase::SerialBase(PinName tx, PinName rx) : | |
_thunk_irq(this), _tx_usage(DMA_USAGE_NEVER), | ||
_rx_usage(DMA_USAGE_NEVER), | ||
#endif | ||
_serial(), _baud(9600) { | ||
_serial(), _baud(MBED_CONF_CORE_STDIO_BAUD_RATE) { | ||
// No lock needed in the constructor | ||
|
||
serial_init(&_serial, tx, rx); | ||
serial_baud(&_serial, _baud); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bogdanm originally said this:
This actually maybe problematic for Silicon Labs targets since their interface chips are tied to 115200 I believe. If we make this change, you might have to set the default stdio for Silicon Labs targets to be 115200 instead of 9600. @0xc0170 might know more about this. |
||
serial_irq_handler(&_serial, SerialBase::_irq_handler, (uint32_t)this); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the default value for MBED_CONF_CORE_STDIO_BAUD_RATE ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whatever you want it to be! :) Right now it's 9600:
https://github.com/ARMmbed/mbed-os/blob/master/mbed_lib.json#L11