Nonvolatile Memory.
Definition at line 38 of file NVRAM.h.
#include <NVRAM.h>
◆ NVRAMClass()
NVRAMClass::NVRAMClass |
( |
| ) |
|
|
inline |
Constructor.
Definition at line 43 of file NVRAM.h.
◆ begin()
void NVRAMClass::begin |
( |
| ) |
|
|
inline |
Initialize Class
Definition at line 46 of file NVRAM.h.
◆ clean_up()
void NVRAMClass::clean_up |
( |
uint16_t |
write_preserve | ) |
|
lear log if full and prepare released pages for faster reallocation. Runtime up to 5000ms!
- Parameters
-
[in] | write_preserve | Byte to preserve |
◆ end()
Deinitialize Class
Definition at line 49 of file NVRAM.h.
◆ length()
uint16_t NVRAMClass::length |
( |
| ) |
const |
NVM available space in bytes
- Returns
- Number of bytes
◆ read()
uint8_t NVRAMClass::read |
( |
const uint16_t |
idx | ) |
|
Read a byte
- Parameters
-
[in] | idx | NVM Address to read |
- Returns
- Byte from given address
◆ read_block()
void NVRAMClass::read_block |
( |
uint8_t * |
dst, |
|
|
uint16_t |
idx, |
|
|
uint16_t |
n |
|
) |
| |
Read a block of bytes
- Parameters
-
[in] | *dst | Write bytes to given pointer |
[in] | idx | First NVM address to read |
[in] | n | Number of bytes to read |
◆ write()
bool NVRAMClass::write |
( |
const uint16_t |
idx, |
|
|
uint8_t |
value |
|
) |
| |
Write a byte
- Parameters
-
[in] | idx | NVM Address to write |
[in] | value | Byte to write |
- Returns
- success
◆ write_block()
bool NVRAMClass::write_block |
( |
uint8_t * |
src, |
|
|
uint16_t |
idx, |
|
|
uint16_t |
n |
|
) |
| |
Write a block
- Parameters
-
[in] | *src | Read bytes from given pointer |
[in] | idx | First NVM address to write |
[in] | n | Number of bytes to write |
- Returns
- success
◆ write_prepare()
int NVRAMClass::write_prepare |
( |
uint16_t |
number | ) |
|
Preserve the number of bytes in NVM log for time critical writes. Runtime up to 5000ms!
- Parameters
-
[in] | number | Bytes to preserve, can 0 to find out free log space |
- Returns
- Bytes available for writing
The documentation for this class was generated from the following file: