File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52 Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -789,9 +789,16 @@ static void nordic_nrf5_uart_configure_object(serial_t *obj)
789
789
#endif
790
790
791
791
/* Configure Tx and Rx pins. */
792
- nrf_gpio_pin_set (uart_object -> tx );
793
- nrf_gpio_cfg_output (uart_object -> tx );
794
- nrf_gpio_cfg_input (uart_object -> rx , NRF_GPIO_PIN_NOPULL );
792
+ if (uart_object -> tx != NRF_UART_PSEL_DISCONNECTED ) {
793
+
794
+ nrf_gpio_pin_set (uart_object -> tx );
795
+ nrf_gpio_cfg_output (uart_object -> tx );
796
+ }
797
+
798
+ if (uart_object -> rx != NRF_UART_PSEL_DISCONNECTED ) {
799
+
800
+ nrf_gpio_cfg_input (uart_object -> rx , NRF_GPIO_PIN_NOPULL );
801
+ }
795
802
796
803
nrf_uarte_txrx_pins_set (nordic_nrf5_uart_register [uart_object -> instance ],
797
804
uart_object -> tx ,
You can’t perform that action at this time.
0 commit comments