grblHAL core  20241107
nvs_buffer.c File Reference
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include "hal.h"
#include "nvs_buffer.h"
#include "protocol.h"
#include "settings.h"
#include "gcode.h"
#include "nvs.h"
#include "report.h"

Data Structures

struct  emap_t
 

Macros

#define NVS_GROUP_GLOBAL   0
 
#define NVS_GROUP_TOOLS   1
 
#define NVS_GROUP_PARAMETERS   2
 
#define NVS_GROUP_STARTUP   3
 
#define NVS_GROUP_BUILD   4
 
#define PARAMETER_ADDR(n)   (NVS_ADDR_PARAMETERS + n * (sizeof(coord_data_t) + NVS_CRC_BYTES))
 
#define STARTLINE_ADDR(n)   (NVS_ADDR_STARTUP_BLOCK + n * (sizeof(stored_line_t) + NVS_CRC_BYTES))
 

Functions

bool nvs_buffer_alloc (void)
 
void nvs_buffer_free (void)
 
bool nvs_buffer_init (void)
 
nvs_address_t nvs_alloc (size_t size)
 
void nvs_buffer_sync_physical (void)
 
nvs_io_tnvs_buffer_get_physical (void)
 
void nvs_memmap (void)
 

Variables

uint32_t nvs_size_max = NVS_SIZE
 
settings_dirty_t settings_dirty
 

Macro Definition Documentation

◆ NVS_GROUP_BUILD

#define NVS_GROUP_BUILD   4

◆ NVS_GROUP_GLOBAL

#define NVS_GROUP_GLOBAL   0

◆ NVS_GROUP_PARAMETERS

#define NVS_GROUP_PARAMETERS   2

◆ NVS_GROUP_STARTUP

#define NVS_GROUP_STARTUP   3

◆ NVS_GROUP_TOOLS

#define NVS_GROUP_TOOLS   1

◆ PARAMETER_ADDR

#define PARAMETER_ADDR (   n)    (NVS_ADDR_PARAMETERS + n * (sizeof(coord_data_t) + NVS_CRC_BYTES))

◆ STARTLINE_ADDR

#define STARTLINE_ADDR (   n)    (NVS_ADDR_STARTUP_BLOCK + n * (sizeof(stored_line_t) + NVS_CRC_BYTES))

Function Documentation

◆ nvs_alloc()

nvs_address_t nvs_alloc ( size_t  size)

◆ nvs_buffer_alloc()

bool nvs_buffer_alloc ( void  )

◆ nvs_buffer_free()

void nvs_buffer_free ( void  )

◆ nvs_buffer_get_physical()

nvs_io_t* nvs_buffer_get_physical ( void  )

◆ nvs_buffer_init()

bool nvs_buffer_init ( void  )

◆ nvs_buffer_sync_physical()

void nvs_buffer_sync_physical ( void  )

◆ nvs_memmap()

void nvs_memmap ( void  )

Variable Documentation

◆ nvs_size_max

uint32_t nvs_size_max = NVS_SIZE

◆ settings_dirty

settings_dirty_t settings_dirty