mirror of
https://github.com/gosticks/RIOT.git
synced 2025-10-16 12:05:37 +00:00
native: clean up SPIFFS default config
This commit is contained in:
parent
ff0d19b686
commit
0905a99905
@ -79,30 +79,52 @@ void _native_LED_RED_TOGGLE(void);
|
|||||||
extern mtd_dev_t *mtd0;
|
extern mtd_dev_t *mtd0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MODULE_SPIFFS
|
#if defined(MODULE_SPIFFS) || DOXYGEN
|
||||||
#define SPIFFS_READ_ONLY 0
|
/**
|
||||||
#define SPIFFS_SINGLETON 0
|
* @name SPIFFS default configuration
|
||||||
|
* @{
|
||||||
#define SPIFFS_HAL_CALLBACK_EXTRA 1
|
*/
|
||||||
|
/* SPIFFS config flags */
|
||||||
#define SPIFFS_CACHE 1
|
#ifndef SPIFFS_READ_ONLY
|
||||||
|
#define SPIFFS_READ_ONLY (0)
|
||||||
|
#endif
|
||||||
|
#ifndef SPIFFS_SINGLETON
|
||||||
|
#define SPIFFS_SINGLETON (0)
|
||||||
|
#endif
|
||||||
|
#ifndef SPIFFS_HAL_CALLBACK_EXTRA
|
||||||
|
#define SPIFFS_HAL_CALLBACK_EXTRA (1)
|
||||||
|
#endif
|
||||||
|
#ifndef SPIFFS_CACHE
|
||||||
|
#define SPIFFS_CACHE (1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if SPIFFS_SINGLETON == 1
|
#if SPIFFS_SINGLETON == 1
|
||||||
#define SPIFFS_CFG_PHYS_SZ(ignore) (0x800000)
|
/* MTD config if singleton is used */
|
||||||
|
#ifndef SPIFFS_CFG_PHYS_SZ
|
||||||
#define SPIFFS_CFG_PHYS_ERASE_SZ(ignore) (4096)
|
#define SPIFFS_CFG_PHYS_SZ(ignore) (MTD_SECTOR_SIZE * MTD_SECTOR_NUM)
|
||||||
|
#endif
|
||||||
#define SPIFFS_CFG_PHYS_ADDR(ignore) (0)
|
#ifndef SPIFFS_CFG_PHYS_ERASE_SZ
|
||||||
|
#define SPIFFS_CFG_PHYS_ERASE_SZ(ignore) (MTD_SECTOR_SIZE)
|
||||||
#define SPIFFS_CFG_LOG_PAGE_SZ(ignore) (256)
|
#endif
|
||||||
|
#ifndef SPIFFS_CFG_PHYS_ADDR
|
||||||
#define SPIFFS_CFG_LOG_BLOCK_SZ(ignore) (4096)
|
#define SPIFFS_CFG_PHYS_ADDR(ignore) (0)
|
||||||
|
#endif
|
||||||
|
#ifndef SPIFFS_CFG_LOG_PAGE_SZ
|
||||||
|
#define SPIFFS_CFG_LOG_PAGE_SZ(ignore) (MTD_PAGE_SIZE)
|
||||||
|
#endif
|
||||||
|
#ifndef SPIFFS_CFG_LOG_BLOCK_SZ
|
||||||
|
#define SPIFFS_CFG_LOG_BLOCK_SZ(ignore) (MTD_SECTOR_SIZE)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SPIFFS_HAL_CALLBACK_EXTRA == 0
|
#if SPIFFS_HAL_CALLBACK_EXTRA == 0
|
||||||
#define SPIFFS_MTD_DEV (MTD_0)
|
/* Default MTD device if no callback parameter */
|
||||||
|
#ifndef SPIFFS_MTD_DEV
|
||||||
|
#define SPIFFS_MTD_DEV (MTD_0)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
/** @} */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user