Loading...
Searching...
No Matches
cc26xx_cc13xx_uart.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 Leon George
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
18#ifndef CC26XX_CC13XX_UART_H
19#define CC26XX_CC13XX_UART_H
20
21#include "cc26xx_cc13xx.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
50
55#define UART_DR_DATA_mask 0xFF
56#define UART_DR_FE 0x100
57#define UART_DR_PE 0x200
58#define UART_DR_BE 0x400
59#define UART_DR_OE 0x800
60
61#define UART_ECR_FE 0x1
62#define UART_ECR_PE 0x2
63#define UART_ECR_BE 0x4
64#define UART_ECR_OE 0x8
65
66#define UART_FR_CTS 0x1
67#define UART_FR_BUSY 0x4
68#define UART_FR_RXFE 0x10
69#define UART_FR_TXFF 0x20
70#define UART_FR_RXFF 0x40
71#define UART_FR_TXFE 0x80
72
73#define UART_LCRH_PEN 0x2
74#define UART_LCRH_EPS 0x4
75#define UART_LCRH_STP2 0x8
76#define UART_LCRH_FEN 0x10
77#define UART_LCRH_WLEN_mask 0x60
78#define UART_LCRH_WLEN_5 0x0
79#define UART_LCRH_WLEN_6 0x20
80#define UART_LCRH_WLEN_7 0x40
81#define UART_LCRH_WLEN_8 0x60
82#define UART_LCRH_SPS 0x80
83
84#define UART_CTL_UARTEN 0x1
85#define UART_CTL_LBE 0x80
86#define UART_CTL_TXE 0x100
87#define UART_CTL_RXE 0x200
88#define UART_CTL_RTS 0x800
89#define UART_CTL_RTSEN 0x4000
90#define UART_CTL_CTSEN 0x8000
91
92#define UART_MIS_CTSMMIS 0x1
93#define UART_MIS_RXMIS 0x10
94#define UART_MIS_TXMIS 0x20
95#define UART_MIS_RTMIS 0x40
96#define UART_MIS_FEMIS 0x80
97#define UART_MIS_PEMIS 0x100
98#define UART_MIS_BEMIS 0x200
99#define UART_MIS_OEMIS 0x400
100
101#define UART_IMSC_CTSMIM 0x2
102#define UART_IMSC_RXIM 0x10
103#define UART_IMSC_TXIM 0x20
104#define UART_IMSC_RTIM 0x40
105#define UART_IMSC_FEIM 0x80
106#define UART_IMSC_PEIM 0x100
107#define UART_IMSC_BEIM 0x200
108#define UART_IMSC_OEIM 0x400
109
110#define UART_IFLS_TXSEL_1_8 0x0
111#define UART_IFLS_TXSEL_2_8 0x1
112#define UART_IFLS_TXSEL_4_8 0x2
113#define UART_IFLS_TXSEL_6_8 0x3
114#define UART_IFLS_TXSEL_7_8 0x4
115
116#define UART_IFLS_RXSEL_1_8 0x0
117#define UART_IFLS_RXSEL_2_8 0x8
118#define UART_IFLS_RXSEL_4_8 0x10
119#define UART_IFLS_RXSEL_6_8 0x18
120#define UART_IFLS_RXSEL_7_8 0x20
127#define UART0_BASE (PERIPH_BASE + 0x1000)
128#define UART1_BASE (PERIPH_BASE + 0xB000)
134#define UART0 ((uart_regs_t *) (UART0_BASE))
138#define UART1 ((uart_regs_t *) (UART1_BASE))
139
140#ifdef __cplusplus
141} /* end extern "C" */
142#endif
143
144#endif /* CC26XX_CC13XX_UART_H */
CC26xx, CC13xx definitions.
volatile uint32_t reg32_t
Unsigned 32-bit register type.
UART component registers.
reg32_t IMSC
Interrupt mask set/clear.
reg32_t ICR
Interrupt clear.
reg32_t IFLS
Interrupt fifo level select.
reg32_t FBRD
Fractional baud-rate divisor.
reg32_t ECR
Error clear.
reg32_t DMACTL
MMA control.
reg32_t LCRH
Line control.
reg32_t IBRD
Integer baud-rate divisor.
reg32_t MIS
Masked interrupt status.
reg32_t RSR
Status.
reg32_t RIS
Raw interrupt status.
reg32_t DR
Data.
reg32_t CTL
Control.