ESP3D  3.0
Firmware for ESP boards connected to 3D Printer
sanity_esp3d.h
Go to the documentation of this file.
1 /*
2  sanity_esp3d.h - esp3d sanity check functions
3 
4  Copyright (c) 2014 Luc Lebosse. All rights reserved.
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with this library; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
21 #ifndef _SANITY_ESP3D_H
22 #define _SANITY_ESP3D_H
23 
24 #include "esp3d_config.h"
25 
26 /**************************
27  * Settings
28  * ***********************/
29 #if (ESP_SAVE_SETTINGS == SETTINGS_IN_PREFERENCES) && defined( ARDUINO_ARCH_ESP8266)
30 #error Preferences library is not available for ESP8266
31 #endif
32 
33 #if !defined (ESP_SAVE_SETTINGS)
34 #error Choose Preferences or EEPROM for settings
35 #endif
36 
37 /**************************
38  * Debug
39  * ***********************/
40 
41 #if defined(ESP_DEBUG_FEATURE)
42 #if ESP_DEBUG_FEATURE == ESP_SERIAL_OUTPUT
43 #warning You use same serial for output and debug
44 #endif //ESP_DEBUG_FEATURE == ESP_SERIAL_OUTPUT
45 #if (ESP_DEBUG_FEATURE == DEBUG_OUTPUT_SERIAL2) && defined( ARDUINO_ARCH_ESP8266)
46 #error Serial 2 is not available in ESP8266 for debug
47 #endif //ESP_DEBUG_FEATURE == DEBUG_OUTPUT_SERIAL2 ) && ARDUINO_ARCH_ESP8266
48 #endif //ESP_DEBUG_FEATURE
49 
50 /**************************
51  * Serial
52  * ***********************/
53 
54 #if !defined(ESP_SERIAL_OUTPUT)
55 #error ESP_SERIAL_OUTPUT must be defined
56 #endif
57 
58 #if (ESP_SERIAL_OUTPUT == USE_SERIAL2) && defined( ARDUINO_ARCH_ESP8266)
59 #error Serial 2 is not available in ESP8266
60 #endif //ESP_SERIAL_OUTPUT == USE_SERIAL_2 ) && ARDUINO_ARCH_ESP8266
61 
62 
63 /**************************
64  * Bluetooth
65  * ***********************/
66 #if defined (BLUETOOTH_FEATURE) && defined( ARDUINO_ARCH_ESP8266)
67 #error Bluetooth is not available in ESP8266
68 #endif
69 
70 
71 /**************************
72  * Ethernet
73  * ***********************/
74 #if defined (ETH_FEATURE) && defined( ARDUINO_ARCH_ESP8266)
75 #error Ethernet is not available in ESP8266
76 #endif
77 
78 /**************************
79  * Time
80  * ***********************/
81 #if defined(FILESYSTEM_TIMESTAMP_FEATURE) && defined( ARDUINO_ARCH_ESP8266) && FILESYSTEM_FEATURE == ESP_SPIFFS_FILESYSTEM
82 #warning Filesystem time is not available in SPIFFS ESP8266 yet
83 #endif
84 
85 /**************************
86  * Filesystem
87  * ***********************/
88 #if FILESYSTEM_FEATURE == ESP_FAT_FILESYSTEM && defined( ARDUINO_ARCH_ESP8266)
89 #error Fat FS is not available in ESP8266
90 #endif
91 #if FILESYSTEM_FEATURE == ESP_LITTLEFS_FILESYSTEM && defined( ARDUINO_ARCH_ESP32)
92 #error LittleFS is not available in ESP32
93 #endif
94 
95 /**************************
96  * Camera
97  * ***********************/
98 #if defined(CAMERA_DEVICE) && defined( ARDUINO_ARCH_ESP8266)
99 #error Camera is not available in ESP8266
100 #endif
101 
102 /**************************
103  * SD
104  * ***********************/
105 #if defined(SD_DEVICE) && defined( ARDUINO_ARCH_ESP8266)
106 #if SD_DEVICE == ESP_SDIO
107 #error SDIO is not available in ESP8266
108 #endif
109 #endif
110 
111 /**************************
112  * FTP
113  * ***********************/
114 #if defined(FTP_FEATURE) && !defined(GLOBAL_FILESYSTEM_FEATURE)
115 #if FTP_FEATURE == FS_ROOT
116 #error FTP_FEATURE == FS_ROOT is not available because GLOBAL_FILESYSTEM_FEATURE is not enabled
117 #endif
118 #endif
119 
120 #if defined(FTP_FEATURE) && !defined(FILESYSTEM_FEATURE)
121 #if FTP_FEATURE == FS_FLASH
122 #error FTP_FEATURE == FS_FLASH is not available because FILESYSTEM_FEATURE is not enabled
123 #endif
124 #endif
125 
126 #if defined(FTP_FEATURE) && !defined(SD_DEVICE)
127 #if FTP_FEATURE == FS_SD
128 #error FTP_FEATURE == FS_SD is not available because SD_DEVICE is not enabled
129 #endif
130 #endif
131 
132 #endif //SANITY_ESP3D_H
esp3d_config.h