mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-24 19:42:27 +03:00
Hook up custom timestamp proc for SD/SDFS (#7686)
The SDFS implementation didn't include plumbing to support user-supplied timestamp generators (for file create/write times) because the SDFat library doesn't support a callback parameter. Work around it by using a single, global (inside sdfs namespace) that the static timestamp callback member can see and use. Add a test of the feature in CI. Fixes #7682
This commit is contained in:
committed by
GitHub
parent
996211f132
commit
1bb0815fed
@ -37,6 +37,8 @@ FS SDFS = FS(FSImplPtr(new sdfs::SDFSImpl()));
|
||||
|
||||
namespace sdfs {
|
||||
|
||||
// Required to be global because SDFAT doesn't allow a this pointer in it's own time call
|
||||
time_t (*__sdfs_timeCallback)(void) = nullptr;
|
||||
|
||||
FileImplPtr SDFSImpl::open(const char* path, OpenMode openMode, AccessMode accessMode)
|
||||
{
|
||||
|
Reference in New Issue
Block a user