1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Re-add deprecated _SPIFFS_xxx linker symbols (#6543)

In order to give user libs a change to update to the new symbols, re-add
the _SPIFFS_XX symbols to the linker file with a comment that they are
deprecated.

Also add back spiffs_hal_xxx functions, also marked as deprecated.

Fixes #6542
This commit is contained in:
Earle F. Philhower, III
2019-09-26 12:28:07 -07:00
committed by david gauchard
parent 2b9fcdb568
commit 418b00f7c0
28 changed files with 166 additions and 0 deletions

View File

@ -25,6 +25,21 @@
using namespace fs;
// Deprecated functions, to be deleted in next release
int32_t spiffs_hal_write(uint32_t addr, uint32_t size, uint8_t *src) {
return flash_hal_write(addr, size, src);
}
int32_t spiffs_hal_erase(uint32_t addr, uint32_t size) {
return flash_hal_erase(addr, size);
}
int32_t spiffs_hal_read(uint32_t addr, uint32_t size, uint8_t *dst) {
return flash_hal_read(addr, size, dst);
}
namespace spiffs_impl {
FileImplPtr SPIFFSImpl::open(const char* path, OpenMode openMode, AccessMode accessMode)

View File

@ -39,6 +39,26 @@ extern "C" {
using namespace fs;
// The following are deprecated symbols and functions, to be removed at the next major release.
// They are provided only for backwards compatibility and to give libs a chance to update.
extern "C" uint32_t _SPIFFS_start __attribute__((deprecated));
extern "C" uint32_t _SPIFFS_end __attribute__((deprecated));
extern "C" uint32_t _SPIFFS_page __attribute__((deprecated));
extern "C" uint32_t _SPIFFS_block __attribute__((deprecated));
#define SPIFFS_PHYS_ADDR ((uint32_t) (&_SPIFFS_start) - 0x40200000)
#define SPIFFS_PHYS_SIZE ((uint32_t) (&_SPIFFS_end) - (uint32_t) (&_SPIFFS_start))
#define SPIFFS_PHYS_PAGE ((uint32_t) &_SPIFFS_page)
#define SPIFFS_PHYS_BLOCK ((uint32_t) &_SPIFFS_block)
extern int32_t spiffs_hal_write(uint32_t addr, uint32_t size, uint8_t *src) __attribute__((deprecated));
extern int32_t spiffs_hal_erase(uint32_t addr, uint32_t size) __attribute__((deprecated));
extern int32_t spiffs_hal_read(uint32_t addr, uint32_t size, uint8_t *dst) __attribute__((deprecated));
namespace spiffs_impl {
int getSpiffsMode(OpenMode openMode, AccessMode accessMode);