Prusa MINI Firmware overview
PersistentStore Class Reference

#include <persistent_store_api.h>

Static Public Member Functions

static bool access_start ()
 
static bool access_finish ()
 
static bool write_data (int &pos, const uint8_t *value, size_t size, uint16_t *crc)
 
static bool read_data (int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing=true)
 
static size_t capacity ()
 
static bool write_data (const int pos, const uint8_t *value, const size_t size=sizeof(uint8_t))
 
static bool write_data (const int pos, const uint8_t value)
 
static bool read_data (const int pos, uint8_t *value, const size_t size=1)
 

Detailed Description

Marlin 3D Printer Firmware

Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] Copyright (c) 2016 Bob Cousins bobco.nosp@m.usin.nosp@m.s42@g.nosp@m.oogl.nosp@m.email.nosp@m..com Copyright (c) 2015-2016 Nico Tonnhofer wurst.nosp@m.nase.nosp@m..repr.nosp@m.ap@g.nosp@m.mail..nosp@m.com Copyright (c) 2016 Victor Perez victo.nosp@m.r_pv.nosp@m.@hotm.nosp@m.ail..nosp@m.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Member Function Documentation

◆ access_start()

static bool PersistentStore::access_start ( )
static
Here is the caller graph for this function:

◆ access_finish()

static bool PersistentStore::access_finish ( )
static
Here is the caller graph for this function:

◆ write_data() [1/3]

static bool PersistentStore::write_data ( int &  pos,
const uint8_t value,
size_t  size,
uint16_t *  crc 
)
static
Here is the caller graph for this function:

◆ read_data() [1/2]

static bool PersistentStore::read_data ( int &  pos,
uint8_t value,
size_t  size,
uint16_t *  crc,
const bool  writing = true 
)
static
Here is the caller graph for this function:

◆ capacity()

static size_t PersistentStore::capacity ( )
static

◆ write_data() [2/3]

static bool PersistentStore::write_data ( const int  pos,
const uint8_t value,
const size_t  size = sizeof(uint8_t) 
)
static
38  {
39  int data_pos = pos;
40  uint16_t crc = 0;
41  return write_data(data_pos, value, size, &crc);
42  }
Here is the call graph for this function:

◆ write_data() [3/3]

static bool PersistentStore::write_data ( const int  pos,
const uint8_t  value 
)
static
44 { return write_data(pos, &value); }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_data() [2/2]

static bool PersistentStore::read_data ( const int  pos,
uint8_t value,
const size_t  size = 1 
)
static
46  {
47  int data_pos = pos;
48  uint16_t crc = 0;
49  return read_data(data_pos, value, size, &crc);
50  }
Here is the call graph for this function:
crc
png_uint_32 crc
Definition: png.c:2247
PersistentStore::write_data
static bool write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc)
PersistentStore::read_data
static bool read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing=true)
size
static png_bytep size_t size
Definition: pngwrite.c:2170