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 20
20
/* Includes ------------------------------------------------------------------*/
21
21
#include "stm32_wpan_common.h"
22
22
23
+ #include <Arduino.h>
24
+
23
25
#include "stm_list.h"
24
26
#include "shci_tl.h"
25
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 )
252
254
{
253
- (void )timeout ;
254
-
255
255
CmdRspStatusFlag = SHCI_TL_CMD_RESP_WAIT ;
256
- while (CmdRspStatusFlag != SHCI_TL_CMD_RESP_RELEASE );
257
-
256
+ for (unsigned long start = millis (); (millis () - start ) < timeout ;) {
257
+ if (CmdRspStatusFlag == SHCI_TL_CMD_RESP_RELEASE ) {
258
+ break ;
259
+ }
260
+ }
258
261
return ;
259
262
}
260
263
You can’t perform that action at this time.
0 commit comments