Loading...
Searching...
No Matches
cfg_uart_default.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2014-2016 Freie Universität Berlin
3 * 2015 Zolertia SL
4 *
5 * This file is subject to the terms and conditions of the GNU Lesser
6 * General Public License v2.1. See the file LICENSE in the top level
7 * directory for more details.
8 */
9
10#pragma once
11
23
24#include "periph_cpu.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34static const uart_conf_t uart_config[] = {
35 /* UART0 is mapped to debug usb */
36 {
37 .dev = UART0_BASEADDR,
38 .rx_pin = GPIO_PIN(PORT_A, 0),
39 .tx_pin = GPIO_PIN(PORT_A, 1),
40#ifdef MODULE_PERIPH_UART_HW_FC
41 .cts_pin = GPIO_UNDEF,
42 .rts_pin = GPIO_UNDEF
43#endif
44 },
45 {
46 .dev = UART1_BASEADDR,
47 .rx_pin = GPIO_PIN(PORT_C, 1),
48 .tx_pin = GPIO_PIN(PORT_C, 0),
49#ifdef MODULE_PERIPH_UART_HW_FC
50 .cts_pin = GPIO_UNDEF,
51 .rts_pin = GPIO_UNDEF
52#endif
53 }
54};
55
56/* interrupt function name mapping */
57#define UART_0_ISR isr_uart0
58#define UART_1_ISR isr_uart1
59
60/* macros common across all UARTs */
61#define UART_NUMOF ARRAY_SIZE(uart_config)
63
64#ifdef __cplusplus
65} /* end extern "C" */
66#endif
67
@ PORT_C
port C
Definition periph_cpu.h:48
@ PORT_A
port A
Definition periph_cpu.h:46
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:45
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
#define UART1_BASEADDR
UART1 Instance.
#define UART0_BASEADDR
UART0 Instance.
UART device configuration.
Definition periph_cpu.h:217