Loading...
Searching...
No Matches
dfplayer_params.h
Go to the documentation of this file.
1/*
2 * Copyright 2019 Marian Buschsieweke
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
19#ifndef DFPLAYER_PARAMS_H
20#define DFPLAYER_PARAMS_H
21
22#include "board.h"
23#include "dfplayer_types.h"
24#include "kernel_defines.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34#ifndef DFPLAYER_PARAM_UART
35#define DFPLAYER_PARAM_UART (UART_DEV(0))
36#endif
37
38#ifndef DFPLAYER_PARAM_BUSY_PIN
39#define DFPLAYER_PARAM_BUSY_PIN (GPIO_UNDEF)
40#endif
41
42#ifndef DFPLAYER_PARAM_VOLUME
43#define DFPLAYER_PARAM_VOLUME (15)
44#endif
45
46#ifndef DFPLAYER_PARAMS
50#define DFPLAYER_PARAMS {\
51 .uart = DFPLAYER_PARAM_UART, \
52 .busy_pin = DFPLAYER_PARAM_BUSY_PIN, \
53 .volume = DFPLAYER_PARAM_VOLUME, \
54 }
55#endif
65
69#define DFPLAYER_NUMOF ARRAY_SIZE(dfplayer_params)
70
71#ifdef __cplusplus
72}
73#endif
74
75#endif /* DFPLAYER_PARAMS_H */
static const dfplayer_params_t dfplayer_params[]
DFPlayer Mini configuration.
#define DFPLAYER_PARAMS
Default initialization parameters of the DFPlayer Mini driver.
Types used in the DFPlayer Mini Device Driver.
Common macros and compiler attributes/pragmas configuration.
Initialization parameters of a DFPlayer Mini device descriptor.