Skip to content

Commit 0cb4ae6

Browse files
committed
Merge pull request #447 from webbbn/nrf51822_uart_any_pin
Adds standard DONT_CARE pin name for specifying that any pin will work
2 parents e4bd6f4 + 611be2a commit 0cb4ae6

File tree

1 file changed

+1
-14
lines changed
  • libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822

1 file changed

+1
-14
lines changed

libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/serial_api.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,6 @@
2727
******************************************************************************/
2828
#define UART_NUM 1
2929

30-
static const PinMap PinMap_UART_TX[] = {
31-
{TX_PIN_NUMBER, UART_0, 1},
32-
{ NC , NC , 0}
33-
};
34-
35-
static const PinMap PinMap_UART_RX[] = {
36-
{RX_PIN_NUMBER, UART_0, 1},
37-
{NC , NC , 0}
38-
};
39-
4030
static uint32_t serial_irq_ids[UART_NUM] = {0};
4131
static uart_irq_handler irq_handler;
4232
static uint32_t acceptedSpeeds[16][2] = {{1200,UART_BAUDRATE_BAUDRATE_Baud1200},
@@ -61,10 +51,7 @@ serial_t stdio_uart;
6151

6252

6353
void serial_init(serial_t *obj, PinName tx, PinName rx) {
64-
// determine the UART to use -- for mcu's with multiple uart connections
65-
UARTName uart_tx = (UARTName)pinmap_peripheral(tx, PinMap_UART_TX);
66-
UARTName uart_rx = (UARTName)pinmap_peripheral(rx, PinMap_UART_RX);
67-
UARTName uart = (UARTName)pinmap_merge(uart_tx, uart_rx);
54+
UARTName uart = UART_0;
6855

6956
MBED_ASSERT((int)uart != NC);
7057

0 commit comments

Comments
 (0)