7#include "libxr_def.hpp"
8#include "libxr_type.hpp"
9#include DEF2STR(LIBXR_CH32_CONFIG_FILE)
63 uint32_t base_address_;
66 bool IsInRange(uint32_t addr,
size_t size)
const;
67 static inline void ClearFlashFlagsOnce();
CH32 闪存驱动实现 / CH32 flash driver implementation.
CH32Flash(const FlashRegion *regions, size_t region_count, uint32_t start_address)
构造闪存对象 / Construct flash object
static constexpr size_t MinWriteSize()
最小写入粒度(半字) / Minimum write size (half-word)
static constexpr size_t MIN_WRITE_SIZE
最小写入单位(字节,半字编程);可直接作为 DatabaseRaw 的模板参数 / Minimum write unit in bytes (half-word programming); usable...
static constexpr uint32_t PageSize()
快速擦除页大小 / Page erase size in fast erase mode
ErrorCode Erase(size_t offset, size_t size) override
擦除闪存的指定区域 / Erases a section of the flash memory.
ErrorCode Write(size_t offset, ConstRawData data) override
向闪存写入数据 / Writes data to the flash memory.
只读原始数据视图 / Immutable raw data view
抽象基类,表示闪存接口。 Abstract base class representing a flash memory interface.
LibXR 命名空间 / LibXR namespace.
ErrorCode
定义错误码枚举 / Defines an enumeration for error codes
一段连续、大小相同的扇区 / A run of contiguous sectors of equal size