Mistake on this page?
Report an issue in GitHub or email us
uart_fpga_test.h
1 /* mbed Microcontroller Library
2  * Copyright (c) 2019 ARM Limited
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 /** \addtogroup hal_GeneralSerial_tests */
19 /** @{*/
20 
21 #ifndef MBED_FPGA_UART_TEST_H
22 #define MBED_FPGA_UART_TEST_H
23 
24 #if DEVICE_SERIAL
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 /** Test that the uart can be initialized/de-initialized using all possible
31  * uart pins (flow control enabled).
32  *
33  * Given board provides uart support with flow control.
34  * When uart is initialized (and then de-initialized) using valid set of uart pins.
35  * Then the operation is successfull.
36  *
37  */
38 void fpga_uart_init_free_test(PinName tx, PinName rx, PinName cts = NC, PinName rts = NC);
39 
40 /** Test that the uart can be initialized/de-initialized using all possible
41  * uart pins (flow control disabled).
42  *
43  * Given board provides uart support without flow control.
44  * When uart is initialized (and then de-initialized) using valid set of uart pins.
45  * Then the operation is successfull.
46  *
47  */
48 void fpga_uart_init_free_test_no_fc(PinName tx, PinName rx);
49 
50 /** Test that the uart transfer can be performed in various configurations (flow control enabled).
51  *
52  * Given board provides uart support with flow control.
53  * When uart transmission is performed using different settings.
54  * Then data is successfully transfered.
55  *
56  */
57 void fpga_uart_test_common(PinName tx, PinName rx, PinName cts = NC, PinName rts = NC);
58 
59 /** Test that the uart transfer can be performed in various configurations (flow control disabled).
60  *
61  * Given board provides uart support without flow control.
62  * When uart transmission is performed using different settings.
63  * Then data is successfully transfered.
64  *
65  */
66 void fpga_uart_test_common_no_fc(PinName tx, PinName rx);
67 
68 /* Common test function. */
69 static void uart_test_common(int baudrate, int data_bits, SerialParity parity, int stop_bits, bool init_direct, PinName tx, PinName rx, PinName cts = NC, PinName rts = NC);
70 
71 /**@}*/
72 
73 #ifdef __cplusplus
74 }
75 #endif
76 
77 #endif
78 
79 #endif
80 
81 /**@}*/
void fpga_uart_init_free_test(PinName tx, PinName rx, PinName cts=NC, PinName rts=NC)
Test that the uart can be initialized/de-initialized using all possible uart pins (flow control enabl...
void fpga_uart_test_common_no_fc(PinName tx, PinName rx)
Test that the uart transfer can be performed in various configurations (flow control disabled)...
void fpga_uart_init_free_test_no_fc(PinName tx, PinName rx)
Test that the uart can be initialized/de-initialized using all possible uart pins (flow control disab...
void fpga_uart_test_common(PinName tx, PinName rx, PinName cts=NC, PinName rts=NC)
Test that the uart transfer can be performed in various configurations (flow control enabled)...
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.