From 0f55f31aaa35357b87e7ff817e2683ba1a277193 Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Thu, 19 Apr 2018 16:30:22 -0400 Subject: Reconstruct the hashsig hash tree(s) on device restart. This can take long enough (several minutes for h=10) that we do it in a background task, which is then converted to an RPC dispatch task. Also add a very limited form of free(), to free the topmost allocation in the sdram "heap". I don't want to deal with real heap management, but I do want to be able to recover memory upon deleting a hashsig key, if it's easy to do so. --- spiflash_n25q128.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spiflash_n25q128.c') diff --git a/spiflash_n25q128.c b/spiflash_n25q128.c index 5e10185..df53f19 100644 --- a/spiflash_n25q128.c +++ b/spiflash_n25q128.c @@ -197,7 +197,7 @@ HAL_StatusTypeDef n25q128_write_page(struct spiflash_ctx *ctx, uint32_t page_off } -static int n25q128_erase_something(struct spiflash_ctx *ctx, uint8_t command, uint32_t byte_offset) +static HAL_StatusTypeDef n25q128_erase_something(struct spiflash_ctx *ctx, uint8_t command, uint32_t byte_offset) { // check offset if (byte_offset >= N25Q128_NUM_BYTES) return HAL_ERROR; -- cgit v1.2.3