Skip to content

Timeout returned when configuring BLE stack for SharedMem transport #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Include a timeout when waiting for the cmd_resp
Signed-off-by: Francois Ramu <[email protected]>
  • Loading branch information
FRASTM committed Feb 3, 2021
commit 3a063dff2f8d4159ced2c98e7d866973dbaf6eec
11 changes: 7 additions & 4 deletions src/utility/STM32Cube_FW/shci_tl.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
/* Includes ------------------------------------------------------------------*/
#include "stm32_wpan_common.h"

#include <Arduino.h>

#include "stm_list.h"
#include "shci_tl.h"
#include "stm32_def.h"
Expand Down Expand Up @@ -323,11 +325,12 @@ static void OutputEvtTrace(TL_EvtPacket_t *phcievtbuffer)
/* Weak implementation ----------------------------------------------------------------*/
__WEAK void shci_cmd_resp_wait(uint32_t timeout)
{
(void)timeout;

CmdRspStatusFlag = SHCI_TL_CMD_RESP_WAIT;
while (CmdRspStatusFlag != SHCI_TL_CMD_RESP_RELEASE);

for (unsigned long start = millis(); (millis() - start) < timeout;) {
if (CmdRspStatusFlag == SHCI_TL_CMD_RESP_RELEASE) {
break;
}
}
return;
}

Expand Down