clean up flash

This commit is contained in:
hathach committed 2019-10-15 16:39:36 +07:00
1 parent d8099f484d
commit ec90ceb3d8
3 files changed
+12 -10

No files matched your search

@@ -59,13 +59,15 @@ static bool fal_verify (uint32_t addr, void const * buf, uint32_t len);
static uint8_t _cache_buffer[FLASH_CACHE_SIZE] __attribute__((aligned(4)));
static flash_cache_t _cache = {
.erase = fal_erase,
.program = fal_program,
.read = fal_read,
.verify = fal_verify,
static flash_cache_t _cache =
{
.erase = fal_erase,
.program = fal_program,
.read = fal_read,
.verify = fal_verify,
.cache_addr = FLASH_CACHE_INVALID_ADDR,
.cache_buf = _cache_buffer
.cache_buf = _cache_buffer
};
//--------------------------------------------------------------------+
@@ -100,7 +102,7 @@ bool flash_nrf5x_erase(uint32_t addr)
//--------------------------------------------------------------------+
// HAL for caching
//--------------------------------------------------------------------+
bool fal_erase (uint32_t addr)
static bool fal_erase (uint32_t addr)
{
// Init semaphore for first call
if ( _sem == NULL )