1 | /** |
---|
2 | * @file tms570-sci.h |
---|
3 | * |
---|
4 | * @ingroup tms570 |
---|
5 | * |
---|
6 | * @brief Serial Communication Interface (SCI) header file. |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * Copyright (c) 2014 Premysl Houdek <kom541000@gmail.com> |
---|
11 | * |
---|
12 | * Google Summer of Code 2014 at |
---|
13 | * Czech Technical University in Prague |
---|
14 | * Zikova 1903/4 |
---|
15 | * 166 36 Praha 6 |
---|
16 | * Czech Republic |
---|
17 | * |
---|
18 | * Based on LPC24xx and LPC1768 BSP |
---|
19 | * by embedded brains GmbH and others |
---|
20 | * |
---|
21 | * The license and distribution terms for this file may be |
---|
22 | * found in the file LICENSE in this distribution or at |
---|
23 | * http://www.rtems.org/license/LICENSE. |
---|
24 | */ |
---|
25 | |
---|
26 | #ifndef LIBBSP_ARM_TMS570_SCI_H |
---|
27 | #define LIBBSP_ARM_TMS570_SCI_H |
---|
28 | |
---|
29 | #include <libchip/serial.h> |
---|
30 | |
---|
31 | #include <rtems.h> |
---|
32 | #include <stdint.h> |
---|
33 | |
---|
34 | #ifdef __cplusplus |
---|
35 | extern "C" { |
---|
36 | #endif /* __cplusplus */ |
---|
37 | |
---|
38 | typedef struct { |
---|
39 | uint32_t SCIGCR0; /*SCIGlobalControlRegister0*/ |
---|
40 | uint32_t SCIGCR1; /*SCIGlobalControlRegister1*/ |
---|
41 | uint32_t reserved1 [0x4/4]; |
---|
42 | uint32_t SCISETINT; /*SCISetInterruptRegister*/ |
---|
43 | uint32_t SCICLEARINT; /*SCIClearInterruptRegister*/ |
---|
44 | uint32_t SCISETINTLVL; /*SCISetInterruptLevelRegister*/ |
---|
45 | uint32_t SCICLEARINTLVL; /*SCIClearInterruptLevelRegister*/ |
---|
46 | uint32_t SCIFLR; /*SCIFlagsRegister*/ |
---|
47 | uint32_t SCIINTVECT0; /*SCIInterruptVectorOffset0*/ |
---|
48 | uint32_t SCIINTVECT1; /*SCIInterruptVectorOffset1*/ |
---|
49 | uint32_t SCIFORMAT; /*SCIFormatControlRegister*/ |
---|
50 | uint32_t BRS; /*BaudRateSelectionRegister*/ |
---|
51 | uint32_t SCIED; /*ReceiverEmulationDataBuffer*/ |
---|
52 | uint32_t SCIRD; /*ReceiverDataBuffer*/ |
---|
53 | uint32_t SCITD; /*TransmitDataBuffer*/ |
---|
54 | uint32_t SCIPIO0; /*SCIPinI/OControlRegister0*/ |
---|
55 | uint32_t SCIPIO1; /*SCIPinI/OControlRegister1*/ |
---|
56 | uint32_t SCIPIO2; /*SCIPinI/OControlRegister2*/ |
---|
57 | uint32_t SCIPIO3; /*SCIPinI/OControlRegister3*/ |
---|
58 | uint32_t SCIPIO4; /*SCIPinI/OControlRegister4*/ |
---|
59 | uint32_t SCIPIO5; /*SCIPinI/OControlRegister5*/ |
---|
60 | uint32_t SCIPIO6; /*SCIPinI/OControlRegister6*/ |
---|
61 | uint32_t SCIPIO7; /*SCIPinI/OControlRegister7*/ |
---|
62 | uint32_t SCIPIO8; /*SCIPinI/OControlRegister8*/ |
---|
63 | uint32_t reserved2 [0x30/4]; |
---|
64 | uint32_t IODFTCTRL; /*Input/OutputErrorEnableRegister*/ |
---|
65 | }tms570_sci_t; |
---|
66 | |
---|
67 | #define TMS570_SCI (*(volatile tms570_sci_t*)0xFFF7E400U) |
---|
68 | #define TMS570_SCI2 (*(volatile tms570_sci_t*)0xFFF7E500U) |
---|
69 | |
---|
70 | /** @} */ |
---|
71 | |
---|
72 | #ifdef __cplusplus |
---|
73 | } |
---|
74 | #endif /* __cplusplus */ |
---|
75 | |
---|
76 | #endif |
---|