We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20b8a4c commit 974ce4cCopy full SHA for 974ce4c
src/utility/STM32_WPAN/shci_tl.c
@@ -24,6 +24,7 @@
24
#include "stm_list.h"
25
#include "shci_tl.h"
26
#include "stm32_def.h"
27
+#include "wiring_time.h"
28
29
/* Private typedef -----------------------------------------------------------*/
30
typedef enum
@@ -251,10 +252,11 @@ static void TlUserEvtReceived(TL_EvtPacket_t *shcievt)
251
252
/* Weak implementation ----------------------------------------------------------------*/
253
__WEAK void shci_cmd_resp_wait(uint32_t timeout)
254
{
- (void)timeout;
255
-
256
- while(CmdRspStatusFlag != SHCI_TL_CMD_RESP_RELEASE);
257
+ for (unsigned long start = millis(); (millis() - start) < timeout;) {
+ if (CmdRspStatusFlag == SHCI_TL_CMD_RESP_RELEASE) {
+ break;
258
+ }
259
260
return;
261
}
262
0 commit comments