mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-14 09:45:58 +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
|
- cd $HOME/arduino_ide/hardware
|
||||||
- mkdir esp8266com
|
- mkdir esp8266com
|
||||||
- cd 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
|
- cd esp8266/tools
|
||||||
- python get.py
|
- python get.py
|
||||||
- cd $HOME/arduino_ide/hardware
|
- cd $HOME/arduino_ide/hardware
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
License along with this library; if not, write to the Free Software
|
License along with this library; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../include/esp3d_config.h"
|
#include "../../include/esp3d_config.h"
|
||||||
#ifdef SD_DEVICE
|
#ifdef SD_DEVICE
|
||||||
#include "esp_sd.h"
|
#include "esp_sd.h"
|
||||||
@ -29,10 +30,10 @@
|
|||||||
#if ((SD_DEVICE == ESP_SD_NATIVE) || (SD_DEVICE == ESP_SDFAT)) && defined (ARDUINO_ARCH_ESP8266)
|
#if ((SD_DEVICE == ESP_SD_NATIVE) || (SD_DEVICE == ESP_SDFAT)) && defined (ARDUINO_ARCH_ESP8266)
|
||||||
#define FS_NO_GLOBALS
|
#define FS_NO_GLOBALS
|
||||||
#define NO_GLOBAL_SD
|
#define NO_GLOBAL_SD
|
||||||
#include "SdFat.h"
|
#include <SdFat.h>
|
||||||
sdfat::File tSDFile_handle[ESP_MAX_SD_OPENHANDLE];
|
sdfat::File tSDFile_handle[ESP_MAX_SD_OPENHANDLE];
|
||||||
#elif (SD_DEVICE == ESP_SDFAT) && defined (ARDUINO_ARCH_ESP32)
|
#elif (SD_DEVICE == ESP_SDFAT) && defined (ARDUINO_ARCH_ESP32)
|
||||||
#include "SdFat.h"
|
#include <SdFat.h>
|
||||||
File tSDFile_handle[ESP_MAX_SD_OPENHANDLE];
|
File tSDFile_handle[ESP_MAX_SD_OPENHANDLE];
|
||||||
#else
|
#else
|
||||||
#include <FS.h>
|
#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);
|
*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;
|
time_t dt = 0;
|
||||||
struct tm timefile;
|
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
|
const char* ESP_SDFile::shortname() const
|
||||||
{
|
{
|
||||||
static char sname[13];
|
static char sname[13];
|
||||||
File ftmp = SD.open(_filename.c_str());
|
sdfat::File ftmp = SD.open(_filename.c_str());
|
||||||
if (ftmp) {
|
if (ftmp) {
|
||||||
ftmp.getSFN(sname);
|
ftmp.getSFN(sname);
|
||||||
ftmp.close();
|
ftmp.close();
|
||||||
|
@ -6,6 +6,7 @@ For details, see http://sourceforge.net/projects/libb64
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
|
#include <stdint.h>
|
||||||
#include <core_esp8266_features.h>
|
#include <core_esp8266_features.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ For details, see http://sourceforge.net/projects/libb64
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
|
#include <stdint.h>
|
||||||
#include <core_esp8266_features.h>
|
#include <core_esp8266_features.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user