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 > 5 axes enabled, space for driver and/or plugin data and settings is required. More... | |
| #define | NVS_CRC_BYTES 2 |
| Number of bytes used for storing CRC values. Do not change this! More... | |
| #define | NVS_SIZE_PARAMETERS ((sizeof(coord_data_t) + NVS_CRC_BYTES) * N_CoordinateSystems) |
| #define | NVS_SIZE_BUILD_INFO (sizeof(stored_line_t) + NVS_CRC_BYTES) |
| #define | NVS_SIZE_STARTUP_BLOCK (N_STARTUP_LINE * (sizeof(stored_line_t) + NVS_CRC_BYTES)) |
| #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 if > 5 axes enabled. More... | |
| #define | calc_checksum(data, length) modbus_crc16x(data, length) |
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 - NVS_SIZE_BUILD_INFO) |
| #define | NVS_ADDR_STARTUP_BLOCK (NVS_ADDR_BUILD_INFO - NVS_SIZE_STARTUP_BLOCK - 1) |
| #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 bool(* | 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 bool(* | 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 } |
| #define calc_checksum | ( | data, | |
| length | |||
| ) | modbus_crc16x(data, length) |
| #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 if > 5 axes enabled.
| #define GRBL_NVS_SIZE (GRBL_NVS_END + 1) |
| #define NVS_ADDR_BUILD_INFO (GRBL_NVS_END - NVS_SIZE_BUILD_INFO) |
| #define NVS_ADDR_GLOBAL 1U |
| #define NVS_ADDR_PARAMETERS 512U |
| #define NVS_ADDR_STARTUP_BLOCK (NVS_ADDR_BUILD_INFO - NVS_SIZE_STARTUP_BLOCK - 1) |
| #define NVS_CRC_BYTES 2 |
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 > 5 axes enabled, space for driver and/or plugin data and settings is required.
| #define NVS_SIZE_BUILD_INFO (sizeof(stored_line_t) + NVS_CRC_BYTES) |
| #define NVS_SIZE_PARAMETERS ((sizeof(coord_data_t) + NVS_CRC_BYTES) * N_CoordinateSystems) |
| #define NVS_SIZE_STARTUP_BLOCK (N_STARTUP_LINE * (sizeof(stored_line_t) + NVS_CRC_BYTES)) |
| 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 bool(* 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 bool(* 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 |