Loading...
Searching...
No Matches
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
28extern "C" {
29#endif
30
35#ifndef SLIPDEV_PARAM_UART
36# ifndef MODULE_SLIPDEV_STDIO
37# ifdef MODULE_USBUS_CDC_ACM
38# define SLIPDEV_PARAM_UART UART_DEV(0)
39# else
40# define SLIPDEV_PARAM_UART UART_DEV(1)
41# endif
42# else /* MODULE_SLIPDEV_STDIO */
43# define SLIPDEV_PARAM_UART STDIO_UART_DEV
44# endif /* MODULE_SLIPDEV_STDIO */
45#endif /* SLIPDEV_PARAM_UART */
46#ifndef SLIPDEV_PARAM_BAUDRATE
47# ifndef MODULE_SLIPDEV_STDIO
48# define SLIPDEV_PARAM_BAUDRATE (115200U)
49# else /* MODULE_SLIPDEV_STDIO */
50# define SLIPDEV_PARAM_BAUDRATE (STDIO_UART_BAUDRATE)
51# endif /* MODULE_SLIPDEV_STDIO */
52#endif /* SLIPDEV_PARAM_BAUDRATE */
53
54#ifndef SLIPDEV_PARAMS
55#define SLIPDEV_PARAMS { .uart = SLIPDEV_PARAM_UART, \
56 .baudrate = SLIPDEV_PARAM_BAUDRATE }
57#endif
67 SLIPDEV_PARAMS
68};
69
70#ifdef __cplusplus
71}
72#endif
73
74#endif /* SLIPDEV_PARAMS_H */
SLIP device definitions.
static const slipdev_params_t slipdev_params[]
slipdev configuration
Configuration parameters for a slipdev.
Definition slipdev.h:110