Documentation
¶
Overview ¶
Package nvs generates ESP-IDF NVS partition images in pure Go — a replacement for nvs_partition_gen.py. See FORMAT.md for the byte-exact spec it implements.
Index ¶
- type Partition
- func (p *Partition) Bytes() ([]byte, error)
- func (p *Partition) SetBlob(ns, key string, data []byte) error
- func (p *Partition) SetI8(ns, key string, v int8) error
- func (p *Partition) SetI16(ns, key string, v int16) error
- func (p *Partition) SetI32(ns, key string, v int32) error
- func (p *Partition) SetI64(ns, key string, v int64) error
- func (p *Partition) SetString(ns, key, val string) error
- func (p *Partition) SetU8(ns, key string, v uint8) error
- func (p *Partition) SetU16(ns, key string, v uint16) error
- func (p *Partition) SetU32(ns, key string, v uint32) error
- func (p *Partition) SetU64(ns, key string, v uint64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Partition ¶
type Partition struct {
// contains filtered or unexported fields
}
Partition accumulates entries and renders a fixed-size NVS image.
func (*Partition) Bytes ¶
Bytes renders the partition image: data pages followed by erased (0xFF) pages, with one trailing page reserved (as the generator does).
func (*Partition) SetBlob ¶
SetBlob stores a binary blob. The blob must fit within a single page (no cross-page chunking yet) — ample for keys/certs; large blobs return an error.
Click to show internal directories.
Click to hide internal directories.