未验证 提交 716823bf 编写于 作者: H HubretXie 提交者: GitHub

减少sfud对任务栈的占用

用全局空间换栈空间,当多个任务需要使用sfud时,可以节省内存
例如多个任务需要使用文件系统,任务栈可以减少
上级 9e990be5
......@@ -603,7 +603,8 @@ static sfud_err page256_or_1_byte_write(const sfud_flash *flash, uint32_t addr,
const uint8_t *data) {
sfud_err result = SFUD_SUCCESS;
const sfud_spi *spi = &flash->spi;
uint8_t cmd_data[5 + SFUD_WRITE_MAX_PAGE_SIZE], cmd_size;
static uint8_t cmd_data[5 + SFUD_WRITE_MAX_PAGE_SIZE];
uint8_t cmd_size;
size_t data_size;
SFUD_ASSERT(flash);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册