We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d758a66 commit 7512953Copy full SHA for 7512953
src/utility/STM32Cube_FW/shci_tl.c
@@ -23,6 +23,7 @@
23
#include "stm_list.h"
24
#include "shci_tl.h"
25
#include "stm32_def.h"
26
+#include "wiring_time.h"
27
28
/* Private typedef -----------------------------------------------------------*/
29
typedef enum
@@ -250,11 +251,12 @@ static void TlUserEvtReceived(TL_EvtPacket_t *shcievt)
250
251
/* Weak implementation ----------------------------------------------------------------*/
252
__WEAK void shci_cmd_resp_wait(uint32_t timeout)
253
{
- (void)timeout;
254
-
255
CmdRspStatusFlag = SHCI_TL_CMD_RESP_WAIT;
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