Skip to content

NRF52 serial: Fix UART console RX #8046

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

Merged
merged 2 commits into from
Oct 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#include "nrf.h"
#include "cmsis_nvic.h"
#include "stdint.h"
#include "PinNames.h"
#include "hal/gpio_api.h"

#if defined(SOFTDEVICE_PRESENT)
#include "nrf_sdm.h"
Expand Down Expand Up @@ -110,3 +112,13 @@ void nrf_reloc_vector_table(void)
SCB->VTOR = (uint32_t) nrf_dispatch_vector;
#endif
}

#if (STDIO_UART_RTS != NC)
void mbed_sdk_init(void)
{
gpio_t rts;
gpio_init_out(&rts, STDIO_UART_RTS);
/* Set STDIO_UART_RTS as gpio driven low */
gpio_write(&rts, 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call will trigger an assert for boards with STDIO_UART_RTS set to NC.

It would be better to wrap everything in an #if macro.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}
#endif