Speedup SD card & enlarge your RAM. (#1649)

* FuriHal: sram2 memory manager
* FuriHal: sram2 memory allocator
* FuriHal: allow NULL buffers for txrx in spi hal
* SD card: sector cache
* FuriHal: fix init in memory hal
* RPC: STARTUP instead SERVICE
* Memory: pool "free" command
* Thread: service can be statically allocated in a memory pool

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
SG
2022-08-27 14:25:47 +10:00
committed by GitHub
parent ab4bb55d0f
commit 99a7d06f71
19 changed files with 410 additions and 53 deletions

View File

@@ -0,0 +1,36 @@
#pragma once
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Init sector cache system
*/
void sector_cache_init();
/**
* @brief Get sector data from cache
* @param n_sector Sector number
* @return Pointer to sector data or NULL if not found
*/
uint8_t* sector_cache_get(uint32_t n_sector);
/**
* @brief Put sector data to cache
* @param n_sector Sector number
* @param data Pointer to sector data
*/
void sector_cache_put(uint32_t n_sector, uint8_t* data);
/**
* @brief Invalidate sector cache for given range
* @param start_sector Start sector number
* @param end_sector End sector number
*/
void sector_cache_invalidate_range(uint32_t start_sector, uint32_t end_sector);
#ifdef __cplusplus
}
#endif