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 
9 #pragma once
10 
21 #include "board.h"
22 #include "dfplayer_types.h"
23 #include "kernel_defines.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #ifndef DFPLAYER_PARAM_UART
34 #define DFPLAYER_PARAM_UART (UART_DEV(0))
35 #endif
36 
37 #ifndef DFPLAYER_PARAM_BUSY_PIN
38 #define DFPLAYER_PARAM_BUSY_PIN (GPIO_UNDEF)
39 #endif
40 
41 #ifndef DFPLAYER_PARAM_VOLUME
42 #define DFPLAYER_PARAM_VOLUME (15)
43 #endif
44 
45 #ifndef DFPLAYER_PARAMS
49 #define DFPLAYER_PARAMS {\
50  .uart = DFPLAYER_PARAM_UART, \
51  .busy_pin = DFPLAYER_PARAM_BUSY_PIN, \
52  .volume = DFPLAYER_PARAM_VOLUME, \
53  }
54 #endif
61 {
63 };
64 
68 #define DFPLAYER_NUMOF ARRAY_SIZE(dfplayer_params)
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
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.