monoZ docs
MZ_flash.h
Go to the documentation of this file.
1
8#ifndef MZ_FLASH_H_
9#define MZ_FLASH_H_
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#include "MZ_BoardCfg.h"
16#include "MZ_common.h"
17#include "MZ_sys_cmsis_os2.h"
18#include "MZ_error_handler.h"
19#if(MZ_FLASH_DRIVER_ENABLE == 1)
20
25typedef enum
26{
31
36typedef struct
37{
44
58
67mz_error_t mz_f_store(st_mz_flash * _ctx, mzUint32 Write_addr,const void * data, mzUint32 size);
68
75
76// relative page_no - start with 0 for 1st page
85#endif //(MZ_FLASH_DRIVER_ENABLE == 1)
86
87#ifdef __cplusplus
88}
89#endif
90#endif /* MZ_FLASH_H_ */
Configuration of monoZ Board This file defines the Hardware and Software features enabled in monoZ Li...
monoZ Lib Common.
unsigned long int mzUint32
4 Byte data type
Definition: MZ_common.h:95
monoZ Error Handler
mz_error_t
Enumeration of monoZ Error Flags.
en_mz_fl_op
Enables the monoZ flash operations.
Definition: MZ_flash.h:26
@ MZ_FL_NOT_READY
Definition: MZ_flash.h:27
@ MZ_FL_READY
Definition: MZ_flash.h:28
@ MZ_FL_WRITE
Definition: MZ_flash.h:29
monoZ system CMSIS OS2 This is an abstraction layer and includes FreeRTOS configuration,...
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.
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.
mz_error_t mz_f_init(st_mz_flash *_ctx, mzUint32 _addr, mzUint32 _n_page)
This function to initialize the flash.
mz_error_t mz_f_erase_full(st_mz_flash *_ctx)
This function erases full flash memory.
Structure for monoZ Flash.
Definition: MZ_flash.h:37
mzUint32 page_number
Definition: MZ_flash.h:41
mzUint32 bank_number
Definition: MZ_flash.h:40
mzUint32 base_addr
Definition: MZ_flash.h:38
en_mz_fl_op current_op
Definition: MZ_flash.h:42
mzUint32 no_of_bank_pages
Definition: MZ_flash.h:39