We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6eb25bc commit 0d821e8Copy full SHA for 0d821e8
src/utility/STM32Cube_FW/shci_tl.c
@@ -20,6 +20,8 @@
20
/* Includes ------------------------------------------------------------------*/
21
#include "stm32_wpan_common.h"
22
23
+#include <Arduino.h>
24
+
25
#include "stm_list.h"
26
#include "shci_tl.h"
27
#include "stm32_def.h"
@@ -250,11 +252,12 @@ static void TlUserEvtReceived(TL_EvtPacket_t *shcievt)
250
252
/* Weak implementation ----------------------------------------------------------------*/
251
253
__WEAK void shci_cmd_resp_wait(uint32_t timeout)
254
{
- (void)timeout;
-
255
CmdRspStatusFlag = SHCI_TL_CMD_RESP_WAIT;
256
- while(CmdRspStatusFlag != SHCI_TL_CMD_RESP_RELEASE);
257
+ for (unsigned long start = millis(); (millis() - start) < timeout;) {
+ if (CmdRspStatusFlag == SHCI_TL_CMD_RESP_RELEASE) {
258
+ break;
259
+ }
260
261
return;
262
}
263
0 commit comments