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
* SPDX-FileCopyrightText: 2014-2016 Freie Universität Berlin
3
* SPDX-FileCopyrightText: 2015 Zolertia SL
4
* SPDX-License-Identifier: LGPL-2.1-only
5
*/
6
7
#pragma once
8
21
#include "periph_cpu.h"
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
31
static
const
uart_conf_t
uart_config[] = {
32
/* UART0 is mapped to debug usb */
33
{
34
.
dev
=
UART0_BASEADDR
,
35
.rx_pin =
GPIO_PIN
(
PORT_A
, 0),
36
.tx_pin =
GPIO_PIN
(
PORT_A
, 1),
37
#ifdef MODULE_PERIPH_UART_HW_FC
38
.cts_pin =
GPIO_UNDEF
,
39
.rts_pin =
GPIO_UNDEF
40
#endif
41
},
42
{
43
.dev =
UART1_BASEADDR
,
44
.rx_pin =
GPIO_PIN
(
PORT_C
, 1),
45
.tx_pin =
GPIO_PIN
(
PORT_C
, 0),
46
#ifdef MODULE_PERIPH_UART_HW_FC
47
.cts_pin =
GPIO_UNDEF
,
48
.rts_pin =
GPIO_UNDEF
49
#endif
50
}
51
};
52
53
/* interrupt function name mapping */
54
#define UART_0_ISR isr_uart0
55
#define UART_1_ISR isr_uart1
56
57
/* macros common across all UARTs */
58
#define UART_NUMOF ARRAY_SIZE(uart_config)
61
#ifdef __cplusplus
62
}
/* end extern "C" */
63
#endif
64
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 Jul 24 2025 16:03:56 by
1.9.1