The friendly Operating System for the Internet of Things
cc2538_uart.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Loci Controls Inc.
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 
20 #ifndef CC2538_UART_H
21 #define CC2538_UART_H
22 
23 #include "cc2538.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
32 typedef struct {
38  union {
41  } cc2538_uart_dr;
42 
43  cc2538_reg_t RESERVED1[4];
48  union {
50  struct {
51  cc2538_reg_t CTS : 1;
52  cc2538_reg_t RESERVED2 : 2;
53  cc2538_reg_t BUSY : 1;
54  cc2538_reg_t RXFE : 1;
55  cc2538_reg_t TXFF : 1;
56  cc2538_reg_t RXFF : 1;
57  cc2538_reg_t TXFE : 1;
58  cc2538_reg_t RESERVED1 : 24;
59  } FRbits;
60  } cc2538_uart_fr;
61 
62  cc2538_reg_t RESERVED2;
70  union {
72  struct {
73  cc2538_reg_t BRK : 1;
74  cc2538_reg_t PEN : 1;
75  cc2538_reg_t EPS : 1;
76  cc2538_reg_t STP2 : 1;
77  cc2538_reg_t FEN : 1;
78  cc2538_reg_t WLEN : 2;
79  cc2538_reg_t SPS : 1;
80  cc2538_reg_t RESERVED : 24;
81  } LCRHbits;
82  } cc2538_uart_lcrh;
83 
87  union {
89  struct {
90  cc2538_reg_t UARTEN : 1;
91  cc2538_reg_t SIREN : 1;
92  cc2538_reg_t SIRLP : 1;
93  cc2538_reg_t RESERVED11 : 1;
94  cc2538_reg_t EOT : 1;
95  cc2538_reg_t HSE : 1;
96  cc2538_reg_t LIN : 1;
97  cc2538_reg_t LBE : 1;
98  cc2538_reg_t TXE : 1;
99  cc2538_reg_t RXE : 1;
100  cc2538_reg_t RESERVED12 : 4;
101  cc2538_reg_t RTSEN : 1;
102  cc2538_reg_t CTSEN : 1;
103  cc2538_reg_t RESERVED13 : 16;
104  } CTLbits;
105  } cc2538_uart_ctl;
106 
110  union {
112  struct {
113  cc2538_reg_t TXIFLSEL : 3;
114  cc2538_reg_t RXIFLSEL : 3;
115  cc2538_reg_t RESERVED : 26;
116  } IFLSbits;
117  } cc2538_uart_ifls;
118 
122  union {
124  struct {
125  cc2538_reg_t RESERVED3 : 4;
126  cc2538_reg_t RXIM : 1;
127  cc2538_reg_t TXIM : 1;
128  cc2538_reg_t RTIM : 1;
129  cc2538_reg_t FEIM : 1;
130  cc2538_reg_t PEIM : 1;
131  cc2538_reg_t BEIM : 1;
132  cc2538_reg_t OEIM : 1;
133  cc2538_reg_t RESERVED2 : 1;
134  cc2538_reg_t NINEBITM : 1;
135  cc2538_reg_t LMSBIM : 1;
136  cc2538_reg_t LME1IM : 1;
137  cc2538_reg_t LME5IM : 1;
138  cc2538_reg_t RESERVED1 : 16;
139  } IMbits;
140  } cc2538_uart_im;
141 
147  union {
149  struct {
150  cc2538_reg_t RESERVED8 : 4;
151  cc2538_reg_t RXMIS : 1;
152  cc2538_reg_t TXMIS : 1;
153  cc2538_reg_t RTMIS : 1;
154  cc2538_reg_t FEMIS : 1;
155  cc2538_reg_t PEMIS : 1;
156  cc2538_reg_t BEMIS : 1;
157  cc2538_reg_t OEMIS : 1;
158  cc2538_reg_t RESERVED9 : 1;
159  cc2538_reg_t NINEBITMIS : 1;
160  cc2538_reg_t LMSBMIS : 1;
161  cc2538_reg_t LME1MIS : 1;
162  cc2538_reg_t LME5MIS : 1;
163  cc2538_reg_t RESERVED10 : 16;
164  } MISbits;
165  } cc2538_uart_mis;
166 
169  cc2538_reg_t RESERVED3[17];
173  cc2538_reg_t RESERVED4[2];
176  cc2538_reg_t RESERVED5[965];
180  cc2538_reg_t RESERVED7[13];
181 } cc2538_uart_t;
182 
183 extern cc2538_uart_t * const UART0;
184 extern cc2538_uart_t * const UART1;
186 #ifdef __cplusplus
187 } /* end extern "C" */
188 #endif
189 
190 #endif /* CC2538_UART_H */
191 
cc2538_reg_t CTL
UART Control.
Definition: cc2538_uart.h:88
cc2538_reg_t RIS
UART Raw Interrupt Status.
Definition: cc2538_uart.h:142
cc2538_reg_t IFLS
UART interrupt FIFO Level Select.
Definition: cc2538_uart.h:111
cc2538_reg_t ICR
UART Interrupt Clear Register.
Definition: cc2538_uart.h:167
cc2538_reg_t FR
UART Flag Register.
Definition: cc2538_uart.h:49
cc2538_reg_t CC
UART Clock Configuration.
Definition: cc2538_uart.h:179
cc2538_reg_t LCTL
UART LIN Control.
Definition: cc2538_uart.h:170
cc2538_reg_t LSS
UART LIN Snap Shot.
Definition: cc2538_uart.h:171
cc2538_uart_t *const UART0
UART0 Instance.
cc2538_reg_t RESERVED6
Reserved addresses.
Definition: cc2538_uart.h:178
cc2538_reg_t RSR
UART receive status and error clear.
Definition: cc2538_uart.h:39
CC2538 MCU interrupt and register definitions.
cc2538_reg_t MIS
UART Masked Interrupt Status.
Definition: cc2538_uart.h:148
cc2538_reg_t FBRD
UART Fractional Baud-Rate Divisor.
Definition: cc2538_uart.h:65
cc2538_reg_t IM
UART Interrupt Mask.
Definition: cc2538_uart.h:123
cc2538_reg_t IBRD
UART Integer Baud-Rate Divisor.
Definition: cc2538_uart.h:64
cc2538_reg_t PP
UART Peripheral Properties.
Definition: cc2538_uart.h:177
cc2538_reg_t LTIM
UART LIN Timer.
Definition: cc2538_uart.h:172
cc2538_reg_t DR
UART Data Register.
Definition: cc2538_uart.h:33
UART component registers.
Definition: cc2538_uart.h:32
cc2538_reg_t ECR
UART receive status and error clear.
Definition: cc2538_uart.h:40
cc2538_reg_t NINEBITADDR
UART 9-bit self Address.
Definition: cc2538_uart.h:174
cc2538_reg_t NINEBITAMASK
UART 9-bit self Address Mask.
Definition: cc2538_uart.h:175
cc2538_reg_t ILPR
UART IrDA Low-Power Register.
Definition: cc2538_uart.h:63
cc2538_reg_t LCRH
UART Line Control Register.
Definition: cc2538_uart.h:71
volatile uint32_t cc2538_reg_t
Least-significant 32 bits of the IEEE address.
Definition: cc2538.h:124
cc2538_reg_t DMACTL
UART DMA Control.
Definition: cc2538_uart.h:168
cc2538_uart_t *const UART1
UART1 Instance.