/
main.c
46 lines (40 loc) · 1010 Bytes
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* Copyright (C) 2018-2019 Bas Stottelaar <basstottelaar@gmail.com>
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup tests
* @{
*
* @file
* @brief Test application for EFM32 specific features.
*
* @author Bas Stottelaar <basstottelaar@gmail.com>
*
* @}
*/
#include "periph/uart.h"
#if EFM32_LEUART_ENABLED
#error "Expected EFM32_LEUART_ENABLED feature to be disabled."
#endif
int main(void)
{
/* test if uart_config[i].mode is set to a know value */
for (unsigned i = 0; i < UART_NUMOF; i++) {
printf("UART %u mode: ", i);
switch (uart_config[i].mode) {
case UART_MODE_8N1:
puts("8N1");
break;
case UART_MODE_8E1:
puts("8E1");
break;
default:
puts("unknown");
}
}
return 0;
}