BeRTOS
Data Structures | Defines | Functions
flash.h File Reference
#include "cfg/cfg_emb_flash.h"
#include <cfg/macros.h>
#include <cfg/compiler.h>
#include <io/kblock.h>
#include <io/kfile.h>
#include <io/kfile_block.h>
#include <cpu/attr.h>
#include <PP_STRINGIZE(drv/PP_CAT3(flash, _, CPU_ID).h)>

Go to the source code of this file.

Data Structures

struct  Flash
 EmbFlash KBlock context structure. More...

Defines

#define flash_init(args...)   PP_CAT(flash_init_, COUNT_PARMS(args)) (args)
 Init function for flash driver.
#define flash_init_2(fls, flags)
 Initialize fls Flash context structure.
Embedded flash error values
#define FLASH_WR_OK   0
 Write ok.
#define FLASH_NOT_ERASED   BV(1)
 Flash memory was not erased before to write it.
#define FLASH_WR_PROTECT   BV(2)
 Write not allowed the flash memory was protected.
#define FLASH_WR_TIMEOUT   BV(3)
 Timeout while writing.
#define FLASH_WR_ERR   BV(4)
 Invalid command and/or a bad keywords.
Flash init flags
#define FLASH_WRITE_ONCE   BV(0)
 Allow only one write per block.
#define FLASH_UNBUFFERED   BV(1)
 Open flash memory disabling page caching, no modification and partial write are allowed.

Functions

FlashFLASH_CAST (KBlock *fls)
 Convert + ASSERT from generic KBlock to Flash.

Detailed Description

Definition in file flash.h.