Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
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
22
#ifndef CFG_UART_DEFAULT_H
23
#define CFG_UART_DEFAULT_H
24
25
#include "periph_cpu.h"
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
35
static
const
uart_conf_t
uart_config[] = {
36
/* UART0 is mapped to debug usb */
37
{
38
.
dev
=
UART0_BASEADDR
,
39
.rx_pin =
GPIO_PIN
(
PORT_A
, 0),
40
.tx_pin =
GPIO_PIN
(
PORT_A
, 1),
41
#ifdef MODULE_PERIPH_UART_HW_FC
42
.cts_pin =
GPIO_UNDEF
,
43
.rts_pin =
GPIO_UNDEF
44
#endif
45
},
46
{
47
.dev =
UART1_BASEADDR
,
48
.rx_pin =
GPIO_PIN
(
PORT_C
, 1),
49
.tx_pin =
GPIO_PIN
(
PORT_C
, 0),
50
#ifdef MODULE_PERIPH_UART_HW_FC
51
.cts_pin =
GPIO_UNDEF
,
52
.rts_pin =
GPIO_UNDEF
53
#endif
54
}
55
};
56
57
/* interrupt function name mapping */
58
#define UART_0_ISR isr_uart0
59
#define UART_1_ISR isr_uart1
60
61
/* macros common across all UARTs */
62
#define UART_NUMOF ARRAY_SIZE(uart_config)
65
#ifdef __cplusplus
66
}
/* end extern "C" */
67
#endif
68
69
#endif
/* CFG_UART_DEFAULT_H */
PORT_C
@ PORT_C
port C
Definition
periph_cpu.h:49
PORT_A
@ PORT_A
port A
Definition
periph_cpu.h:47
GPIO_PIN
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition
periph_cpu.h:46
GPIO_UNDEF
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
Definition
periph_cpu_common.h:54
UART1_BASEADDR
#define UART1_BASEADDR
UART1 Instance.
Definition
cc2538_uart.h:184
UART0_BASEADDR
#define UART0_BASEADDR
UART0 Instance.
Definition
cc2538_uart.h:183
uart_conf_t
UART device configuration.
Definition
periph_cpu.h:218
uart_conf_t::dev
USART_t * dev
pointer to the used UART device
Definition
periph_cpu.h:219
Generated on Sat Nov 16 2024 08:08:27 by
1.9.8