|
|
|
|
@ -24,7 +24,13 @@
|
|
|
|
|
#ifndef FLASH_H_
|
|
|
|
|
#define FLASH_H_
|
|
|
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
|
|
#ifndef NULL
|
|
|
|
|
#define NULL 0
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* using ENV function */
|
|
|
|
|
#define FLASH_USING_ENV
|
|
|
|
|
@ -36,7 +42,7 @@
|
|
|
|
|
#define FLASH_USER_SETTING_ENV_SIZE (2 * 1024) /* default 2K */
|
|
|
|
|
/* using wear leveling mode or normal mode */
|
|
|
|
|
/* #define FLASH_ENV_USING_WEAR_LEVELING_MODE */
|
|
|
|
|
#define FLASH_ENV_USING_NORMAL_MODE
|
|
|
|
|
#define FLASH_ENV_USING_NORMAL_MODE */
|
|
|
|
|
|
|
|
|
|
/* Flash debug print function. Must be implement by user. */
|
|
|
|
|
#define FLASH_DEBUG(...) flash_log_debug(__FILE__, __LINE__, __VA_ARGS__)
|
|
|
|
|
@ -50,7 +56,7 @@ if (!(EXPR)) \
|
|
|
|
|
while (1); \
|
|
|
|
|
}
|
|
|
|
|
/* EasyFlash software version number */
|
|
|
|
|
#define FLASH_SW_VERSION "1.04.23"
|
|
|
|
|
#define FLASH_SW_VERSION "1.05.16"
|
|
|
|
|
|
|
|
|
|
typedef struct _flash_env{
|
|
|
|
|
char *key;
|
|
|
|
|
|