Skip to content

Commit 86a4aa7

Browse files
committed
Explicitly set the baud rate for the shared Serial
This helps avoiding confusion when different targets have different baud rate expectation. If we enable the EFM32GG_STK3700 target, for example, it would fail to print if the baud rate was 9600, the default mbed baud rate.
1 parent fcc1638 commit 86a4aa7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

source/main-hw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ extern Serial shared_pc;
3131
#define LED_OFF true
3232
#define SECURE_SWITCH SW2
3333
#define SECURE_SWITCH_PULL PullUp
34+
#define SHARED_SERIAL_BAUD 9600
3435

3536
#define MAIN_ACL(acl_list_name) \
3637
static const UvisorBoxAclItem acl_list_name[] = { \
@@ -52,7 +53,6 @@ extern Serial shared_pc;
5253
}
5354

5455
#else /* Target-specific settings */
55-
5656
#error "Unsupported target. Checkout the README.md file for the list of supported targets for this app."
5757

5858
#endif /* Target-specific settings */

source/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ DigitalOut led_red(LED1);
3838
DigitalOut led_green(LED2);
3939
DigitalOut led_blue(LED3);
4040

41-
Serial shared_pc(USBTX, USBRX);
41+
Serial shared_pc(USBTX, USBRX, SHARED_SERIAL_BAUD);
4242

4343
static uint32_t get_a_number()
4444
{

0 commit comments

Comments
 (0)