File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
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"
@@ -323,11 +325,12 @@ static void OutputEvtTrace(TL_EvtPacket_t *phcievtbuffer)
323
325
/* Weak implementation ----------------------------------------------------------------*/
324
326
__WEAK void shci_cmd_resp_wait (uint32_t timeout )
325
327
{
326
- (void )timeout ;
327
-
328
328
CmdRspStatusFlag = SHCI_TL_CMD_RESP_WAIT ;
329
- while (CmdRspStatusFlag != SHCI_TL_CMD_RESP_RELEASE );
330
-
329
+ for (unsigned long start = millis (); (millis () - start ) < timeout ;) {
330
+ if (CmdRspStatusFlag == SHCI_TL_CMD_RESP_RELEASE ) {
331
+ break ;
332
+ }
333
+ }
331
334
return ;
332
335
}
333
336
You can’t perform that action at this time.
0 commit comments