-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathUSaberConfig.h
103 lines (89 loc) · 3.43 KB
/
USaberConfig.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*
This file is part of the Universal Saber library.
The Universal Saber library is free software: you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.
The Universal Saber library is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the Universal Saber library. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* USaberConfig.h
*
* This file is to be included in certain "heavy weight" features of the
* Universal Saber library so that they can be optionally excluded from the
* build. The code in certain files is #ifdef wrapped such that they contain
* no code or only "Light Weight" code unless their corresponding BUILD_XXX
* #define exists.
*
* To remove a feature and prevent it from building, simply comment out the
* corresponding #define for the feature.
*
* The reason this is necessary is that some of the libraries introduce
* declarations that allocate static or global memory or inflate the compiled
* hex file size regardless of if the feature is actually used. Not only is
* this is an unnecessary waste of resources, it may also introduce
* incompatibility with certain MCUs such as the ATTiny chips which don't
* support I2C or Wire.
*
* Note that features that do not perform these kinds of "Heavy" actions are
* always included as they cost little or nothing in the way of RAM or
* compiled hex file size unless they are actually used.
*
* For now, all features are enabled by default.
*
* Created on: Jun 24, 2016
* Author: JakeSoft
*/
#ifndef _USABER_USABERCONFIG_H_
#define _USABER_USABERCONFIG_H_
//Comment out the line for which you'd like to exclude the corresponding feature
/**
* Build the MPU6050MotionManager.
* Note: This requires that I2CDEV also be enabled below.
*/
#define BUILD_MPU6050
/**
* Build the MPU6050LiteMotionManager and MPU6050AdvancedMotionManager.
* Note: This requires the Wire library (included by default with Arduino IDE)
*/
#define BUILD_MPU6050LITE
/**
* Build USaber's built-in I2CDev library.
* Note: This requires that Wire also be included in the sketch.
*/
#define BUILD_I2CDEV
/**
* Build USaber's built-in Software Serial library.
* Note: This must be included for the DFPlayerSouundPlayer to build.
* Note: Some other features may not work if this is excluded from the build.
*/
//#define BUILD_SOFTWARE_SERIAL
/**
* Build the DFPlayerSoundPlayer.
* Note: Software serial must also be enabled for this to work.
* Note2: Mutually exclusive with DIYinoSoundPlayer.
*/
//#define BUILD_DFPLAYERSOUNDPLAYER
/**
* Build the BY8301SoundPlayer.
*/
#define BUILD_BY8301SoundPlayer
/**
* Build the DIYinoSoundPlayer.
* Note: Incompatible with SoftwareSerial. Only build this if not
* using SoftwareSerial in your project.
* Note2: Incompatible with DFPlayerSoundPlayer. Disable this if
* using DFPlayerSoundPlayer and only build one of them.
*/
#define BUILD_DIYINOSOUNDPLAYER
/**
* Try to automatically include the Wire library.
* Note: This may not work for older versions of the Arduino IDE.
*/
#define AUTO_INCLUDE_WIRE
#endif /* _USABER_USABERCONFIG_H_ */