Go to the source code of this file.
Data Structures | |
struct | nvs_driver_area_t |
Structure for keeping track of NVS area used by driver and/or plugin code. More... | |
struct | nvs_io_t |
Handler functions and variables for NVS storage of settings and data. More... | |
Macros | |
#define | NVS_SIZE 2048 |
Total size in bytes of the NVS. Minimum 1024 bytes required, more if space for driver and/or plugin data and settings is required. More... | |
#define | GRBL_NVS_END 1023 |
Number of bytes at the start of the NVS area reserved for core settings and parameters. Minimum 1024 bytes required. More... | |
#define | NVS_CRC_BYTES 1 |
Number of bytes used for storing CRC values. Do not change this! More... | |
Define persistent storage memory address location values for core settings and parameters. | |
The upper half is reserved for parameters and the startup script. The lower half contains the global settings and space for future developments. NOTE: 1024 bytes of persistent storage is the minimum required. | |
#define | NVS_ADDR_GLOBAL 1U |
#define | NVS_ADDR_PARAMETERS 512U |
#define | NVS_ADDR_BUILD_INFO (GRBL_NVS_END - 81U) |
#define | NVS_ADDR_STARTUP_BLOCK (NVS_ADDR_BUILD_INFO - 1 - N_STARTUP_LINE * (sizeof(stored_line_t) + NVS_CRC_BYTES)) |
#define | GRBL_NVS_SIZE (GRBL_NVS_END + 1) |
Typedefs | |
typedef uint8_t(* | get_byte_ptr) (uint32_t addr) |
Pointer to function for getting a byte from NVS storage. More... | |
typedef void(* | put_byte_ptr) (uint32_t addr, uint8_t new_value) |
Pointer to function for putting a byte into NVS storage. More... | |
typedef nvs_transfer_result_t(* | memcpy_from_nvs_ptr) (uint8_t *dest, uint32_t source, uint32_t size, bool with_checksum) |
Pointer to function for reading a block of data from NVS storage. More... | |
typedef nvs_transfer_result_t(* | memcpy_to_nvs_ptr) (uint32_t dest, uint8_t *source, uint32_t size, bool with_checksum) |
Pointer to function for writing a block of data to NVS storage. More... | |
typedef bool(* | memcpy_from_flash_ptr) (uint8_t *dest) |
Pointer to function for reading a block of data from flash based NVS storage. More... | |
typedef bool(* | memcpy_to_flash_ptr) (uint8_t *source) |
Pointer to function for reading a block of data from flash based NVS storage. More... | |
Enumerations | |
enum | nvs_type { NVS_None = 0 , NVS_EEPROM , NVS_FRAM , NVS_Flash , NVS_Emulated } |
enum | nvs_transfer_result_t { NVS_TransferResult_Failed = 0 , NVS_TransferResult_Busy , NVS_TransferResult_OK } |
#define GRBL_NVS_END 1023 |
Number of bytes at the start of the NVS area reserved for core settings and parameters. Minimum 1024 bytes required.
#define GRBL_NVS_SIZE (GRBL_NVS_END + 1) |
#define NVS_ADDR_BUILD_INFO (GRBL_NVS_END - 81U) |
#define NVS_ADDR_GLOBAL 1U |
#define NVS_ADDR_PARAMETERS 512U |
#define NVS_ADDR_STARTUP_BLOCK (NVS_ADDR_BUILD_INFO - 1 - N_STARTUP_LINE * (sizeof(stored_line_t) + NVS_CRC_BYTES)) |
#define NVS_CRC_BYTES 1 |
Number of bytes used for storing CRC values. Do not change this!
#define NVS_SIZE 2048 |
Total size in bytes of the NVS. Minimum 1024 bytes required, more if space for driver and/or plugin data and settings is required.
typedef uint8_t(* get_byte_ptr) (uint32_t addr) |
Pointer to function for getting a byte from NVS storage.
addr | index base address into the area. |
typedef bool(* memcpy_from_flash_ptr) (uint8_t *dest) |
Pointer to function for reading a block of data from flash based NVS storage.
dest | pointer to destination of data. |
typedef nvs_transfer_result_t(* memcpy_from_nvs_ptr) (uint8_t *dest, uint32_t source, uint32_t size, bool with_checksum) |
Pointer to function for reading a block of data from NVS storage.
dest | pointer to destination of data. |
source | index based address into the storage area. |
size | number of bytes to write. |
with_checksum | true calculate and verify checksum at the end of the data block, false do not calculate and verify checksum. |
typedef bool(* memcpy_to_flash_ptr) (uint8_t *source) |
Pointer to function for reading a block of data from flash based NVS storage.
source | pointer to source data. |
typedef nvs_transfer_result_t(* memcpy_to_nvs_ptr) (uint32_t dest, uint8_t *source, uint32_t size, bool with_checksum) |
Pointer to function for writing a block of data to NVS storage.
dest | index based address into the storage area. |
source | pointer to source data |
size | number of bytes to write |
with_checksum | true calculate and add a checksum at the end of the data block, false do not add checksum. |
typedef void(* put_byte_ptr) (uint32_t addr, uint8_t new_value) |
Pointer to function for putting a byte into NVS storage.
addr | index based address into the storage area. |
new_value | byte to write. |
enum nvs_type |