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;
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_SPIFFS
|
||||
#define SPIFFS_READ_ONLY 0
|
||||
#define SPIFFS_SINGLETON 0
|
||||
|
||||
#define SPIFFS_HAL_CALLBACK_EXTRA 1
|
||||
|
||||
#define SPIFFS_CACHE 1
|
||||
#if defined(MODULE_SPIFFS) || DOXYGEN
|
||||
/**
|
||||
* @name SPIFFS default configuration
|
||||
* @{
|
||||
*/
|
||||
/* SPIFFS config flags */
|
||||
#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
|
||||
#define SPIFFS_CFG_PHYS_SZ(ignore) (0x800000)
|
||||
|
||||
#define SPIFFS_CFG_PHYS_ERASE_SZ(ignore) (4096)
|
||||
|
||||
#define SPIFFS_CFG_PHYS_ADDR(ignore) (0)
|
||||
|
||||
#define SPIFFS_CFG_LOG_PAGE_SZ(ignore) (256)
|
||||
|
||||
#define SPIFFS_CFG_LOG_BLOCK_SZ(ignore) (4096)
|
||||
/* MTD config if singleton is used */
|
||||
#ifndef SPIFFS_CFG_PHYS_SZ
|
||||
#define SPIFFS_CFG_PHYS_SZ(ignore) (MTD_SECTOR_SIZE * MTD_SECTOR_NUM)
|
||||
#endif
|
||||
#ifndef SPIFFS_CFG_PHYS_ERASE_SZ
|
||||
#define SPIFFS_CFG_PHYS_ERASE_SZ(ignore) (MTD_SECTOR_SIZE)
|
||||
#endif
|
||||
#ifndef SPIFFS_CFG_PHYS_ADDR
|
||||
#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
|
||||
|
||||
#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
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user