HF Interface Wrapper 0.1.0-dev
Embedded C++ hardware abstraction layer
Loading...
Searching...
No Matches
EspNvs.h File Reference

World-class ESP32-C6 NVS storage implementation with ESP-IDF v5.5+ features. More...

#include "BaseNvs.h"
#include "PlatformMutex.h"
#include "utils/EspTypes_NVS.h"
#include <cstdint>
Include dependency graph for EspNvs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  EspNvs
 Production-ready MCU-integrated non-volatile storage implementation. More...
 

Detailed Description

World-class ESP32-C6 NVS storage implementation with ESP-IDF v5.5+ features.

This header provides a production-ready NVS implementation for microcontrollers with built-in non-volatile storage capabilities. On ESP32-C6, this leverages the modern ESP-IDF v5.5+ NVS API with comprehensive security features, encryption support, performance optimizations, and robust error handling.

Key Features:

  • Modern ESP-IDF v5.5+ NVS API with handle-based operations
  • ESP32-C6 HMAC-based encryption support for secure storage
  • Comprehensive error handling and mapping to HardFOC error codes
  • Advanced NVS features: statistics, validation, performance monitoring
  • Thread-safe operations with optional mutex protection
  • Namespace isolation and management
  • Key-value storage with multiple data type support
  • Atomic operations and consistency guarantees

Security Features:

  • HMAC-based encryption scheme (ESP32-C6 specific)
  • XTS encryption for data protection
  • Secure key generation and eFuse-based key storage
  • Flash encryption compatibility
  • Tamper resistance and data integrity validation

Performance Optimizations:

  • Efficient handle management and validation
  • Optimized error code mapping with comprehensive coverage
  • Statistics tracking for performance monitoring
  • Intelligent commit strategies for durability vs. performance
  • Key validation caching and namespace management
Author
Nebiyu Tadesse
Date
2025
Note
This implementation is specifically optimized for ESP32-C6 production environments.
Requires ESP-IDF v5.5 or later for full feature support.
All platform-specific types are abstracted through McuTypes.h.
Uses McuSelect.h for centralized platform configuration.