mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-13 18:55:57 +08:00
Fix compilation issue with SD anf esp8266
This commit is contained in:
parent
3bae4748bf
commit
3784120487
@ -32,7 +32,7 @@ before_script:
|
||||
- cd $HOME/arduino_ide/hardware
|
||||
- mkdir esp8266com
|
||||
- cd esp8266com
|
||||
- git clone -b 2.5.2 https://github.com/esp8266/Arduino.git esp8266
|
||||
- git clone https://github.com/esp8266/Arduino.git esp8266
|
||||
- cd esp8266/tools
|
||||
- python get.py
|
||||
- cd $HOME/arduino_ide/hardware
|
||||
|
@ -17,6 +17,7 @@
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "../../include/esp3d_config.h"
|
||||
#ifdef SD_DEVICE
|
||||
#include "esp_sd.h"
|
||||
@ -29,10 +30,10 @@
|
||||
#if ((SD_DEVICE == ESP_SD_NATIVE) || (SD_DEVICE == ESP_SDFAT)) && defined (ARDUINO_ARCH_ESP8266)
|
||||
#define FS_NO_GLOBALS
|
||||
#define NO_GLOBAL_SD
|
||||
#include "SdFat.h"
|
||||
#include <SdFat.h>
|
||||
sdfat::File tSDFile_handle[ESP_MAX_SD_OPENHANDLE];
|
||||
#elif (SD_DEVICE == ESP_SDFAT) && defined (ARDUINO_ARCH_ESP32)
|
||||
#include "SdFat.h"
|
||||
#include <SdFat.h>
|
||||
File tSDFile_handle[ESP_MAX_SD_OPENHANDLE];
|
||||
#else
|
||||
#include <FS.h>
|
||||
|
@ -42,7 +42,7 @@ void dateTime (uint16_t* date, uint16_t* dtime)
|
||||
*dtime = FAT_TIME (tmstruct.tm_hour, tmstruct.tm_min, tmstruct.tm_sec);
|
||||
}
|
||||
|
||||
time_t getDateTimeFile(File & filehandle)
|
||||
time_t getDateTimeFile(sdfat::File & filehandle)
|
||||
{
|
||||
time_t dt = 0;
|
||||
struct tm timefile;
|
||||
@ -750,7 +750,7 @@ ESP_SDFile::ESP_SDFile(void* handle, bool isdir, bool iswritemode, const char *
|
||||
const char* ESP_SDFile::shortname() const
|
||||
{
|
||||
static char sname[13];
|
||||
File ftmp = SD.open(_filename.c_str());
|
||||
sdfat::File ftmp = SD.open(_filename.c_str());
|
||||
if (ftmp) {
|
||||
ftmp.getSFN(sname);
|
||||
ftmp.close();
|
||||
|
@ -6,6 +6,7 @@ For details, see http://sourceforge.net/projects/libb64
|
||||
*/
|
||||
|
||||
#ifdef ESP8266
|
||||
#include <stdint.h>
|
||||
#include <core_esp8266_features.h>
|
||||
#endif
|
||||
|
||||
|
@ -6,6 +6,7 @@ For details, see http://sourceforge.net/projects/libb64
|
||||
*/
|
||||
|
||||
#ifdef ESP8266
|
||||
#include <stdint.h>
|
||||
#include <core_esp8266_features.h>
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user