File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 21
21
/* Includes ------------------------------------------------------------------*/
22
22
#include "stm32_wpan_common.h"
23
23
24
+ #include <Arduino.h>
25
+
24
26
#include "stm_list.h"
25
27
#include "shci_tl.h"
26
28
#include "stm32_def.h"
@@ -346,11 +348,12 @@ static void OutputEvtTrace(TL_EvtPacket_t *phcievtbuffer)
346
348
/* Weak implementation ----------------------------------------------------------------*/
347
349
__WEAK void shci_cmd_resp_wait (uint32_t timeout )
348
350
{
349
- (void )timeout ;
350
-
351
351
CmdRspStatusFlag = SHCI_TL_CMD_RESP_WAIT ;
352
- while (CmdRspStatusFlag != SHCI_TL_CMD_RESP_RELEASE );
353
-
352
+ for (unsigned long start = millis (); (millis () - start ) < timeout ;) {
353
+ if (CmdRspStatusFlag == SHCI_TL_CMD_RESP_RELEASE ) {
354
+ break ;
355
+ }
356
+ }
354
357
return ;
355
358
}
356
359
@@ -363,4 +366,4 @@ __WEAK void shci_cmd_resp_release(uint32_t flag)
363
366
return ;
364
367
}
365
368
366
- #endif /* STM32WBxx */
369
+ #endif /* STM32WBxx */
You can’t perform that action at this time.
0 commit comments