Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
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
24
#include "periph_cpu.h"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
34
static
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)
64
#ifdef __cplusplus
65
}
/* end extern "C" */
66
#endif
67
PORT_C
@ PORT_C
port C
Definition:
periph_cpu.h:48
PORT_A
@ PORT_A
port A
Definition:
periph_cpu.h:46
GPIO_PIN
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition:
periph_cpu.h:45
GPIO_UNDEF
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
Definition:
periph_cpu_common.h:53
UART1_BASEADDR
#define UART1_BASEADDR
UART1 Instance.
Definition:
cc2538_uart.h:183
UART0_BASEADDR
#define UART0_BASEADDR
UART0 Instance.
Definition:
cc2538_uart.h:182
uart_conf_t
UART device configuration.
Definition:
periph_cpu.h:217
uart_conf_t::dev
USART_t * dev
pointer to the used UART device
Definition:
periph_cpu.h:218
Generated on Thu Jun 26 2025 14:14:44 by
1.9.1