Merge pull request #7487 from marcuschangarm/fix-nrf52-serial

Allow STDIO pins to be NC in NRF52 series
pull/7502/head
Cruz Monrreal 2018-07-12 10:05:08 -05:00 committed by GitHub
commit 6300d8b5e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 3 deletions

View File

@ -789,9 +789,16 @@ static void nordic_nrf5_uart_configure_object(serial_t *obj)
#endif
/* Configure Tx and Rx pins. */
nrf_gpio_pin_set(uart_object->tx);
nrf_gpio_cfg_output(uart_object->tx);
nrf_gpio_cfg_input(uart_object->rx, NRF_GPIO_PIN_NOPULL);
if (uart_object->tx != NRF_UART_PSEL_DISCONNECTED) {
nrf_gpio_pin_set(uart_object->tx);
nrf_gpio_cfg_output(uart_object->tx);
}
if (uart_object->rx != NRF_UART_PSEL_DISCONNECTED) {
nrf_gpio_cfg_input(uart_object->rx, NRF_GPIO_PIN_NOPULL);
}
nrf_uarte_txrx_pins_set(nordic_nrf5_uart_register[uart_object->instance],
uart_object->tx,