Skip to content

Commit

Permalink
update semaphore calls
Browse files Browse the repository at this point in the history
  • Loading branch information
mkardous-silabs committed Mar 7, 2023
1 parent 0771cff commit 8002923
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/platform/silabs/efr32/wf200/wf200_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ sl_status_t sl_wfx_host_reset_chip(void)
*****************************************************************************/
sl_status_t sl_wfx_host_wait_for_wake_up(void)
{
xSemaphoreTake(wfx_wakeup_sem, TICKS_TO_WAIT_0);
xSemaphoreTake(wfx_wakeup_sem, TICKS_TO_WAIT_3 / portTICK_PERIOD_MS);
xSemaphoreTake(wfx_wakeup_sem, pdMS_TO_TICKS(TICKS_TO_WAIT_0));
xSemaphoreTake(wfx_wakeup_sem, pdMS_TO_TICKS(TICKS_TO_WAIT_3));

return SL_STATUS_OK;
}
Expand Down Expand Up @@ -418,7 +418,7 @@ sl_status_t sl_wfx_host_lock(void)

sl_status_t status = SL_STATUS_OK;

if (xSemaphoreTake(wfx_mutex, TICKS_TO_WAIT_500) != pdTRUE)
if (xSemaphoreTake(wfx_mutex, pdMS_TO_TICKS(TICKS_TO_WAIT_500)) != pdTRUE)
{
SILABS_LOG("*ERR*Wi-Fi driver mutex timo");
status = SL_STATUS_TIMEOUT;
Expand Down
2 changes: 1 addition & 1 deletion src/platform/silabs/SilabsConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static StaticSemaphore_t nvm3_SemStruct;
void nvm3_lockBegin(void)
{
VerifyOrDie(nvm3_Sem != NULL);
xSemaphoreTake(nvm3_Sem, SILABS_SEM_TIMEOUT_ms);
xSemaphoreTake(nvm3_Sem, pdMS_TO_TICKS(SILABS_SEM_TIMEOUT_ms));
}

void nvm3_lockEnd(void)
Expand Down

0 comments on commit 8002923

Please sign in to comment.