Skip to content

Commit

Permalink
boards/common/remote: Changed UART config format
Browse files Browse the repository at this point in the history
Changed the configuration of the Remote boards to fit the new
cc2538 format defined in the previous commit. That is, from a
defines based format to a struct based format.
  • Loading branch information
danpetry committed Feb 8, 2018
1 parent 06b98c8 commit 2781a42
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions boards/common/remote/include/periph_common.h
Expand Up @@ -73,22 +73,26 @@ static const timer_conf_t timer_config[] = {
#define RADIO_IRQ_PRIO 1
/** @} */


/**
* @name UART configuration
* @{
*/
#define UART_NUMOF (1U)
#define UART_0_EN 1
#define UART_IRQ_PRIO 1
static const uart_conf_t uart_config[] = {
{
.dev = UART0_BASEADDR,
.rx_pin = GPIO_PIN(0, 0),
.tx_pin = GPIO_PIN(0, 1),
.cts_pin = GPIO_UNDEF,
.rts_pin = GPIO_UNDEF
}
};

/* UART 0 device configuration */
#define UART_0_DEV UART0
#define UART_0_IRQ UART0_IRQn
/* interrupt function name mapping */
#define UART_0_ISR isr_uart0
/* UART 0 pin configuration */
#define UART_0_TX_PIN GPIO_PIN(0, 1) /**< GPIO_PA1 */
#define UART_0_RX_PIN GPIO_PIN(0, 0) /**< GPIO_PA0 */

/* macros common across all UARTs */
#define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0]))

/** @} */

#ifdef __cplusplus
Expand Down

0 comments on commit 2781a42

Please sign in to comment.