Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
SPIFFS.cxx File Reference
#include "SPIFFS.hxx"
#include <fcntl.h>
#include "spiffs.h"
#include "spiffs_nucleus.h"

Go to the source code of this file.

Classes

struct  SPIFFS::OpenDir
 Open directory metadata structure. More...
 

Macros

#define _FDIRECT   0x80000
 
#define O_DIRECT   _FDIRECT
 

Functions

void extern_spiffs_lock (struct spiffs_t *fs)
 Provide mutex lock.
 
void extern_spiffs_unlock (struct spiffs_t *fs)
 Provide mutex unlock.
 
static void stat_post_process (struct stat *stat, spiffs_stat *ffs_stat)
 Common post processing for SPIFFS::stat() and SPIFFS::fstat().
 

Variables

int globalLastSPIFFSError
 global error number for the last SPIFFS error
 

Detailed Description

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This file implements the generic SPIFFS driver.

Author
Stuart W. Baker
Date
1 January 2018

Definition in file SPIFFS.cxx.

Macro Definition Documentation

◆ _FDIRECT

#define _FDIRECT   0x80000

Definition at line 42 of file SPIFFS.cxx.

◆ O_DIRECT

#define O_DIRECT   _FDIRECT

Definition at line 46 of file SPIFFS.cxx.

Function Documentation

◆ extern_spiffs_lock()

void extern_spiffs_lock ( struct spiffs_t *  fs)

Provide mutex lock.

Parameters
fsreference to the file system instance

Definition at line 66 of file SPIFFS.cxx.

◆ extern_spiffs_unlock()

void extern_spiffs_unlock ( struct spiffs_t *  fs)

Provide mutex unlock.

Parameters
fsreference to the file system instance

Definition at line 73 of file SPIFFS.cxx.

◆ stat_post_process()

static void stat_post_process ( struct stat *  stat,
spiffs_stat *  ffs_stat 
)
static

Common post processing for SPIFFS::stat() and SPIFFS::fstat().

Parameters
statstructure to fill status info into
ff_statSPIFFS structure to gather info from

Definition at line 359 of file SPIFFS.cxx.

Variable Documentation

◆ globalLastSPIFFSError

int globalLastSPIFFSError

global error number for the last SPIFFS error

Definition at line 62 of file SPIFFS.cxx.