slipdev_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018-2020 Freie Universität Berlin
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 
18 #ifndef SLIPDEV_PARAMS_H
19 #define SLIPDEV_PARAMS_H
20 
21 #include "board.h"
22 #include "slipdev.h"
23 #ifdef MODULE_SLIPDEV_STDIO
24 #include "stdio_uart.h"
25 #endif
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 #ifndef SLIPDEV_PARAM_UART
36 # ifndef MODULE_SLIPDEV_STDIO
37 # define SLIPDEV_PARAM_UART (UART_DEV(0))
38 # else /* MODULE_SLIPDEV_STDIO */
39 # define SLIPDEV_PARAM_UART (STDIO_UART_DEV)
40 # endif /* MODULE_SLIPDEV_STDIO */
41 #endif /* SLIPDEV_PARAM_UART */
42 #ifndef SLIPDEV_PARAM_BAUDRATE
43 # ifndef MODULE_SLIPDEV_STDIO
44 # define SLIPDEV_PARAM_BAUDRATE (115200U)
45 # else /* MODULE_SLIPDEV_STDIO */
46 # define SLIPDEV_PARAM_BAUDRATE (STDIO_UART_BAUDRATE)
47 # endif /* MODULE_SLIPDEV_STDIO */
48 #endif /* SLIPDEV_PARAM_BAUDRATE */
49 
50 #ifndef SLIPDEV_PARAMS
51 #define SLIPDEV_PARAMS { .uart = SLIPDEV_PARAM_UART, \
52  .baudrate = SLIPDEV_PARAM_BAUDRATE }
53 #endif
54 
62 static const slipdev_params_t slipdev_params[] = {
63  SLIPDEV_PARAMS
64 };
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif /* SLIPDEV_PARAMS_H */
71 
stdio_uart.h
slipdev_params_t
Configuration parameters for a slipdev.
Definition: slipdev.h:81
slipdev_params
static const slipdev_params_t slipdev_params[]
slipdev configuration
Definition: slipdev_params.h:62
slipdev.h
SLIP device definitions.