]> begriffs open source - cmsis-driver-validation/blob - Config/DV_USART_Config.h
Updated assembler settings in uVision projects using NXP MIMXRT1064-EVK board
[cmsis-driver-validation] / Config / DV_USART_Config.h
1 /*
2  * Copyright (c) 2015-2020 Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Licensed under the Apache License, Version 2.0 (the License); you may
7  * not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * -----------------------------------------------------------------------------
19  *
20  * $Revision:   V1.0.0
21  *
22  * Project:     CMSIS-Driver Validation
23  * Title:       Universal Synchronous Asynchronous Receiver/Transmitter (USART) 
24  *              driver validation configuration file
25  *
26  * -----------------------------------------------------------------------------
27  */
28
29 #ifndef DV_USART_CONFIG_H_
30 #define DV_USART_CONFIG_H_
31
32 //-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
33
34 // <h> USART
35 // <i> Universal Synchronous Asynchronous Receiver/Transmitter (USART) driver validation configuration
36 // <o> Driver_USART# <0-255>
37 // <i> Choose the Driver_USART# instance to test.
38 // <i> For example to test Driver_USART0 select 0.
39 #define DRV_USART                       0
40 // <h> USART baudrates
41 // <i> Set the USART baudrates (bps)
42 // <i> Value zero is ignored
43 // <o> USART baudrate 1
44 #define USART_BR_1                      9600
45 // <o> USART baudrate 2
46 #define USART_BR_2                      19200
47 // <o> USART baudrate 3
48 #define USART_BR_3                      38400
49 // <o> USART baudrate 4
50 #define USART_BR_4                      57600
51 // <o> USART baudrate 5
52 #define USART_BR_5                      115200
53 // <o> USART baudrate 6
54 #define USART_BR_6                      921600
55 // </h>
56 // <o> Percentual tolerance for baudrate test
57 // <i> Set the tolerance between measured and expected baudrates (%)
58 #define TOLERANCE_BR                    5
59 // <o> USART data bits
60 // <i> Set the USART data bits
61 #define USART_DATA_BITS                 8
62 // <o> Transfer timeout
63 // <i> Set the transfer timeout (us)
64 #define USART_TRANSFER_TIMEOUT          1000000
65 // <h> Tests
66 // <i> Enable / disable tests.
67 // <q> USART_GetCapabilities
68 #define USART_GETCAPABILITIES_EN        1
69 // <q> USART_Initialization
70 #define USART_INITIALIZATION_EN         1
71 // <q> USART_PowerControl
72 #define USART_POWERCONTROL_EN           1
73 // <q> USART_Config_PolarityPhase
74 #define USART_CONFIG_POLARITYPHASE_EN   1
75 // <q> USART_Config_DataBits
76 #define USART_CONFIG_DATABITS_EN        1
77 // <q> USART_Config_StopBits
78 #define USART_CONFIG_STOPBITS_EN        1
79 // <q> USART_Config_Parity
80 #define USART_CONFIG_PARITY_EN          1
81 // <q> USART_Config_Baudrate
82 #define USART_CONFIG_BAUDRATE_EN        1
83 // <q> USART_Config_CommonParams
84 #define USART_CONFIG_COMMONPARAMS_EN    1
85 // <q> USART_Send
86 #define USART_SEND_EN                   1
87 // <q> USART_AsynchronousReceive
88 #define USART_ASYNCHRONOUSRECEIVE_EN    1
89 // <q> USART_Loopback_CheckBaudrate
90 #define USART_LOOPBACK_CHECKBAUDRATE_EN 1
91 // <q> USART_Loopback_Transfer
92 #define USART_LOOPBACK_TRANSFER_EN      1
93 // <q> USART_CheckInvalidInit
94 #define USART_CHECKINVALIDINIT_EN       1
95 // </h>
96 // </h>
97
98 // Buffer definitions
99 #define BUFFER_ELEM_1_32                0               // 0 = disable, 1 = enable
100 #define BUFFER_ELEM_512                 1               // 0 = disable, 1 = enable
101 #define BUFFER_ELEM_1024                0               // 0 = disable, 1 = enable
102 #define BUFFER_ELEM_4096                0               // 0 = disable, 1 = enable
103 #define BUFFER_ELEM_32768               0               // 0 = disable, 1 = enable
104 #define BUFFER_SIZE_BR                  512             // Buffer size for baudrate tests
105 #define BUFFER_PATTERN                 {0x55, 0xAA}     // Buffer pattern
106
107 // Device specific local loopback settings
108 #define USART_LOCAL_LOOPBACK()
109
110 #endif /* DV_USART_CONFIG_H_ */