monoZ docs
monoZ Flash

-For monoZ Flash APIs refer MZ_flash.h file. More...

Functions

mz_error_t mz_f_init (st_mz_flash *_ctx, mzUint32 _addr, mzUint32 _n_page)
 This function to initialize the flash. More...
 
mz_error_t mz_f_store (st_mz_flash *_ctx, mzUint32 Write_addr, const void *data, mzUint32 size)
 This function is used to write and store the data in flash memory. More...
 
mz_error_t mz_f_erase_full (st_mz_flash *_ctx)
 This function erases full flash memory. More...
 
mz_error_t mz_f_erase_ctx_relative_page_no (st_mz_flash *_ctx, mzUint32 page_no)
 This function erases particular page in flash memory. More...
 

Detailed Description

-For monoZ Flash APIs refer MZ_flash.h file.

Function Documentation

◆ mz_f_init()

mz_error_t mz_f_init ( st_mz_flash _ctx,
mzUint32  _addr,
mzUint32  _n_page 
)

This function to initialize the flash.

Flash size mentioned shall be multiples of 8 bytes.

Parameters
_ctx*st_mz_flash
_addrmzUint32
_n_pagemzUint32
Returns
MZ_OK/MZ_FAIL

◆ mz_f_store()

mz_error_t mz_f_store ( st_mz_flash _ctx,
mzUint32  Write_addr,
const void *  data,
mzUint32  size 
)

This function is used to write and store the data in flash memory.

Parameters
_ctx*st_mz_flash
Write_addrmzUint32
dataconst void*
sizemzUint32- size should be in the multiples of 8.
Returns
MZ_OK/MZ_FAIL

◆ mz_f_erase_full()

mz_error_t mz_f_erase_full ( st_mz_flash _ctx)

This function erases full flash memory.

Parameters
_ctxst_mz_flash
Returns
MZ_OK/MZ_FAIL

◆ mz_f_erase_ctx_relative_page_no()

mz_error_t mz_f_erase_ctx_relative_page_no ( st_mz_flash _ctx,
mzUint32  page_no 
)

This function erases particular page in flash memory.

Parameters
_ctxst_mz_flash
page_nomzUint32
Returns
MZ_OK/MZ_FAIL