Logo
Explore Help
Register Sign In
fengqi/lv_micropython
1
0
Fork 0
You've already forked lv_micropython
Code Issues Pull Requests 1 Actions Packages Projects Releases Wiki Activity
lv_micropython/stmhal/storage.h

10 lines
312 B
C
Raw Normal View History

stmhal: Add flash write support and flash storage driver.
2014-03-17 13:31:35 +00:00
#define FLASH_BLOCK_SIZE (512)
void storage_init(void);
uint32_t storage_get_block_size(void);
uint32_t storage_get_block_count(void);
stmhal: Improve flash storage cache management. Internal flash used for the filesystem is now written (from the cache) only after a 5s delay, or when a file is closed, or when the drive is unmounted from the host. This delay means that multiple writes can accumulate in the cache, and leads to less writes to the flash, making it last longer. It's implemented by a high-priority interrupt that takes care of flash erase and write, and flushing the cache. This is still only an interim solution for the flash filesystem. It eventually needs to be replaced with something that uses less RAM for the cache, something that can use more of the flash, and something that does proper wear levelling.
2014-04-16 23:08:36 +01:00
void storage_irq_handler(void);
stmhal: Add flash write support and flash storage driver.
2014-03-17 13:31:35 +00:00
void storage_flush(void);
bool storage_read_block(uint8_t *dest, uint32_t block);
bool storage_write_block(const uint8_t *src, uint32_t block);
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 31ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API