Merge pull request #634 from ourairquality/sysparam-init-sem
sysparam: always create the semaphore on init.
This commit is contained in:
commit
eed96df5dd
1 changed files with 2 additions and 2 deletions
|
@ -505,6 +505,8 @@ sysparam_status_t sysparam_init(uint32_t base_addr, uint32_t top_addr) {
|
||||||
struct sysparam_context ctx;
|
struct sysparam_context ctx;
|
||||||
uint16_t num_sectors;
|
uint16_t num_sectors;
|
||||||
|
|
||||||
|
_sysparam_info.sem = xSemaphoreCreateMutex();
|
||||||
|
|
||||||
// Make sure we're starting at the beginning of the sector
|
// Make sure we're starting at the beginning of the sector
|
||||||
base_addr -= (base_addr % sdk_flashchip.sector_size);
|
base_addr -= (base_addr % sdk_flashchip.sector_size);
|
||||||
|
|
||||||
|
@ -584,8 +586,6 @@ sysparam_status_t sysparam_init(uint32_t base_addr, uint32_t top_addr) {
|
||||||
_sysparam_info.end_addr = ctx.addr;
|
_sysparam_info.end_addr = ctx.addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
_sysparam_info.sem = xSemaphoreCreateMutex();
|
|
||||||
|
|
||||||
return SYSPARAM_OK;
|
return SYSPARAM_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue