Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
ArduinoFs.hxx File Reference
#include "stm32_eeprom.h"
#include <errno.h>

Go to the source code of this file.

Classes

class  FsStatic
 Class that holds information and code for the single-file filesystem for emulating eeprom. More...
 
struct  FsStatic::FileInfo
 We have one of these for each open file descriptor. More...
 

Macros

#define EEPROM_FILENAME   "/dev/eeprom"
 

Functions

int _open_r (struct _reent *reent, const char *path, int flags, int mode)
 
int _close_r (struct _reent *reent, int fd)
 
ssize_t _read_r (struct _reent *reent, int fd, void *buf, size_t count)
 
ssize_t _write_r (struct _reent *reent, int fd, const void *buf, size_t count)
 
int fsync (int fd)
 
int _stat_r (struct _reent *reent, const char *path, struct stat *stat)
 
int _fstat_r (struct _reent *reent, int fd, struct stat *stat)
 
_off_t _lseek_r (struct _reent *reent, int fd, _off_t offset, int whence)
 

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.

Single-file POSIX compatible filesystem using Arduino's EEPROM implementation for STM32.

This file needs to be included into the .ino of the arduino sketch. It may only be compiled once as it has definitions of C library functions.

Author
Balazs Racz
Date
18 July 2020

Definition in file ArduinoFs.hxx.

Macro Definition Documentation

◆ EEPROM_FILENAME

#define EEPROM_FILENAME   "/dev/eeprom"

Definition at line 53 of file ArduinoFs.hxx.

Function Documentation

◆ _close_r()

int _close_r ( struct _reent *  reent,
int  fd 
)

Definition at line 162 of file ArduinoFs.hxx.

◆ _fstat_r()

int _fstat_r ( struct _reent *  reent,
int  fd,
struct stat *  stat 
)

Definition at line 259 of file ArduinoFs.hxx.

◆ _lseek_r()

_off_t _lseek_r ( struct _reent *  reent,
int  fd,
_off_t  offset,
int  whence 
)

Definition at line 271 of file ArduinoFs.hxx.

◆ _open_r()

int _open_r ( struct _reent *  reent,
const char *  path,
int  flags,
int  mode 
)

Definition at line 147 of file ArduinoFs.hxx.

◆ _read_r()

ssize_t _read_r ( struct _reent *  reent,
int  fd,
void *  buf,
size_t  count 
)

Definition at line 174 of file ArduinoFs.hxx.

◆ _stat_r()

int _stat_r ( struct _reent *  reent,
const char *  path,
struct stat *  stat 
)

Definition at line 247 of file ArduinoFs.hxx.

◆ _write_r()

ssize_t _write_r ( struct _reent *  reent,
int  fd,
const void *  buf,
size_t  count 
)

Definition at line 203 of file ArduinoFs.hxx.

◆ fsync()

int fsync ( int  fd)

Definition at line 236 of file ArduinoFs.hxx.