libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
uart_common.h
Go to the documentation of this file.
1
/** @addtogroup uart_defines
2
*
3
* @brief UART registers are mostly equivalent to USART registers.
4
*
5
* USART and UART registers are equivalent except [in UART registers]:
6
*
7
* * USART_CTRL: SYNC, CSMA, SMSDELAY, SSSEARLY, CSINV, CPOL and CPHA
8
* (Synchronous operation not available)
9
* * USART_STATUS: MASTEREN (Synchronous operation not available)
10
* * USART_CTRL: MSBF (transmission LSB first only)
11
* * USART_CTRL: AUTOCS (chip-select not available)
12
* * USART_CTRL: SCMODE (SmartCard mode not available)
13
* * USART_FRAME: DATABITS (limited framesize. 8-9 databits only)
14
* * USART_IRCTRL: IREN (IrDA not available)
15
* (except DATABITS, all the above are 0)
16
*
17
* full text: (p495, "d0183_Rev1.10" EFM32LG-RM)
18
* - "18.3 Functional Description",
19
* - "18.4 Register Description"
20
* - "18.5 Register Map"
21
*
22
* use USART macro's to manipulate UART registers.
23
*/
24
/*
25
* This file is part of the libopencm3 project.
26
*
27
* Copyright (C) 2015 Kuldeep Singh Dhaka <kuldeepdhaka9@gmail.com>
28
*
29
* This library is free software: you can redistribute it and/or modify
30
* it under the terms of the GNU Lesser General Public License as published by
31
* the Free Software Foundation, either version 3 of the License, or
32
* (at your option) any later version.
33
*
34
* This library is distributed in the hope that it will be useful,
35
* but WITHOUT ANY WARRANTY; without even the implied warranty of
36
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37
* GNU Lesser General Public License for more details.
38
*
39
* You should have received a copy of the GNU Lesser General Public License
40
* along with this library. If not, see <http://www.gnu.org/licenses/>.
41
*/
42
43
#pragma once
44
45
#include <
libopencm3/efm32/memorymap.h
>
46
#include <
libopencm3/efm32/usart.h
>
47
48
/**@{*/
49
50
/* UART0 */
51
#define UART0 UART0_BASE
52
#define UART0_CTRL USART_CTRL(UART0)
53
#define UART0_FRAME USART_FRAME(UART0)
54
#define UART0_TRIGCTRL USART_TRIGCTRL(UART0)
55
#define UART0_CMD USART_CMD(UART0)
56
#define UART0_STATUS USART_STATUS(UART0)
57
#define UART0_CLKDIV USART_CLKDIV(UART0)
58
#define UART0_RXDATAX USART_RXDATAX(UART0)
59
#define UART0_RXDATA USART_RXDATA(UART0)
60
#define UART0_RXDOUBLEX USART_RXDOUBLEX(UART0)
61
#define UART0_RXDOUBLE USART_RXDOUBLE(UART0)
62
#define UART0_RXDATAXP USART_RXDATAXP(UART0)
63
#define UART0_RXDOUBLEXP USART_RXDOUBLEXP(UART0)
64
#define UART0_TXDATAX USART_TXDATAX(UART0)
65
#define UART0_TXDATA USART_TXDATA(UART0)
66
#define UART0_TXDOUBLEX USART_TXDOUBLEX(UART0)
67
#define UART0_TXDOUBLE USART_TXDOUBLE(UART0)
68
#define UART0_IF USART_IF(UART0)
69
#define UART0_IFS USART_IFS(UART0)
70
#define UART0_IFC USART_IFC(UART0)
71
#define UART0_IEN USART_IEN(UART0)
72
#define UART0_IRCTRL USART_IRCTRL(UART0)
73
#define UART0_ROUTE USART_ROUTE(UART0)
74
#define UART0_INPUT USART_INPUT(UART0)
75
#define UART0_I2SCTRL USART_I2SCTRL(UART0)
76
77
/* UART1 */
78
#define UART1 UART1_BASE
79
#define UART1_CTRL USART_CTRL(UART1)
80
#define UART1_FRAME USART_FRAME(UART1)
81
#define UART1_TRIGCTRL USART_TRIGCTRL(UART1)
82
#define UART1_CMD USART_CMD(UART1)
83
#define UART1_STATUS USART_STATUS(UART1)
84
#define UART1_CLKDIV USART_CLKDIV(UART1)
85
#define UART1_RXDATAX USART_RXDATAX(UART1)
86
#define UART1_RXDATA USART_RXDATA(UART1)
87
#define UART1_RXDOUBLEX USART_RXDOUBLEX(UART1)
88
#define UART1_RXDOUBLE USART_RXDOUBLE(UART1)
89
#define UART1_RXDATAXP USART_RXDATAXP(UART1)
90
#define UART1_RXDOUBLEXP USART_RXDOUBLEXP(UART1)
91
#define UART1_TXDATAX USART_TXDATAX(UART1)
92
#define UART1_TXDATA USART_TXDATA(UART1)
93
#define UART1_TXDOUBLEX USART_TXDOUBLEX(UART1)
94
#define UART1_TXDOUBLE USART_TXDOUBLE(UART1)
95
#define UART1_IF USART_IF(UART1)
96
#define UART1_IFS USART_IFS(UART1)
97
#define UART1_IFC USART_IFC(UART1)
98
#define UART1_IEN USART_IEN(UART1)
99
#define UART1_IRCTRL USART_IRCTRL(UART1)
100
#define UART1_ROUTE USART_ROUTE(UART1)
101
#define UART1_INPUT USART_INPUT(UART1)
102
#define UART1_I2SCTRL USART_I2SCTRL(UART1)
103
104
/**@}*/
memorymap.h
Dispatcher for the base address definitions, depending on the particular Gecko family.
usart.h
include
libopencm3
efm32
common
uart_common.h
Generated on Tue Mar 7 2023 16:12:44 for libopencm3 by
1.9.4