Loading...
Searching...
No Matches
dfplayer_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 Marian Buschsieweke
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h"
19#include "dfplayer_types.h"
20#include "kernel_defines.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30#ifndef DFPLAYER_PARAM_UART
31#define DFPLAYER_PARAM_UART (UART_DEV(0))
32#endif
33
34#ifndef DFPLAYER_PARAM_BUSY_PIN
35#define DFPLAYER_PARAM_BUSY_PIN (GPIO_UNDEF)
36#endif
37
38#ifndef DFPLAYER_PARAM_VOLUME
39#define DFPLAYER_PARAM_VOLUME (15)
40#endif
41
42#ifndef DFPLAYER_PARAMS
46#define DFPLAYER_PARAMS {\
47 .uart = DFPLAYER_PARAM_UART, \
48 .busy_pin = DFPLAYER_PARAM_BUSY_PIN, \
49 .volume = DFPLAYER_PARAM_VOLUME, \
50 }
51#endif
53
61
65#define DFPLAYER_NUMOF ARRAY_SIZE(dfplayer_params)
66
67#ifdef __cplusplus
68}
69#endif
70
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.