boards/samr21-xpro: adapted and extended UART defs
- adapted to optimized UART implementation - defined a 2. UART device
This commit is contained in:
parent
1a29163b63
commit
444d9e1d76
@ -23,7 +23,9 @@
|
|||||||
#define PERIPH_CONF_H_
|
#define PERIPH_CONF_H_
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
|
#include "periph_cpu.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -101,19 +103,21 @@ extern "C" {
|
|||||||
* @name UART configuration
|
* @name UART configuration
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define UART_NUMOF (1U)
|
/* deprecated UART enable defines (to be removed) */
|
||||||
|
#define UART_NUMOF (2U)
|
||||||
#define UART_0_EN 1
|
#define UART_0_EN 1
|
||||||
#define UART_IRQ_PRIO 1
|
#define UART_1_EN 1
|
||||||
|
|
||||||
/* UART 0 device configuration */
|
/* UART device configuration */
|
||||||
#define UART_0_DEV SERCOM0->USART
|
static const uart_conf_t uart_config[] = {
|
||||||
#define UART_0_IRQ SERCOM0_IRQn
|
/* device, RX pin, TX pin, mux */
|
||||||
|
{&SERCOM0->USART, GPIO(PA,5), GPIO(PA,4), GPIO_MUX_D},
|
||||||
|
{&SERCOM5->USART, GPIO(PA,23), GPIO(PA,22), GPIO_MUX_D},
|
||||||
|
};
|
||||||
|
|
||||||
|
/* interrupt function name mapping */
|
||||||
#define UART_0_ISR isr_sercom0
|
#define UART_0_ISR isr_sercom0
|
||||||
/* UART 0 pin configuration */
|
#define UART_1_ISR isr_sercom5
|
||||||
#define UART_0_PORT (PORT->Group[0])
|
|
||||||
#define UART_0_TX_PIN (4)
|
|
||||||
#define UART_0_RX_PIN (5)
|
|
||||||
#define UART_0_PINS (PORT_PA04 | PORT_PA05)
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user