File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 2121/* Includes ------------------------------------------------------------------*/
2222#include "stm32_wpan_common.h"
2323
24+ #include <Arduino.h>
25+
2426#include "stm_list.h"
2527#include "shci_tl.h"
2628#include "stm32_def.h"
@@ -346,11 +348,12 @@ static void OutputEvtTrace(TL_EvtPacket_t *phcievtbuffer)
346348/* Weak implementation ----------------------------------------------------------------*/
347349__WEAK void shci_cmd_resp_wait (uint32_t timeout )
348350{
349- (void )timeout ;
350-
351351 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+ }
354357 return ;
355358}
356359
@@ -363,4 +366,4 @@ __WEAK void shci_cmd_resp_release(uint32_t flag)
363366 return ;
364367}
365368
366- #endif /* STM32WBxx */
369+ #endif /* STM32WBxx */
You can’t perform that action at this time.
0 commit comments