-#if CONFIG_KDEBUG_PORT == 0
- #define UART_BASE UART0
- #define UART_INT UART0_IRQn
- #define UART_PIO_BASE PIOA
- #define UART_PINS (GPIO_UART0_RX_PIN | GPIO_UART0_TX_PIN)
-#elif (CONFIG_KDEBUG_PORT == 1) && !defined(CPU_CM3_AT91SAM3U)
- #define UART_BASE UART1
- #define UART_INT UART1_IRQn
- #define UART_PIO_BASE PIOB
- #define UART_PINS (GPIO_UART1_RX_PIN | GPIO_UART1_TX_PIN)
+#if (CONFIG_KDEBUG_PORT == 0)
+ #define UART_BASE UART0_BASE
+ #define UART_ID UART0_ID
+ #define UART_PIO_BASE UART0_PORT
+ #define UART_PERIPH UART0_PERIPH
+ #define UART_PINS (BV(URXD0) | BV(UTXD0))
+#elif (CONFIG_KDEBUG_PORT == 1) && UART_PORTS > 1
+ #define UART_BASE UART1_BASE
+ #define UART_ID UART1_ID
+ #define UART_PIO_BASE UART1_PORT
+ #define UART_PERIPH UART1_PERIPH
+ #define UART_PINS (BV(URXD1) | BV(UTXD1))