We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d082c7d commit 0f32757Copy full SHA for 0f32757
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,10 +251,11 @@ 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
- while(CmdRspStatusFlag != SHCI_TL_CMD_RESP_RELEASE);
256
+ for (unsigned long start = millis(); (millis() - start) < timeout;) {
+ if (CmdRspStatusFlag == SHCI_TL_CMD_RESP_RELEASE) {
+ break;
257
+ }
258
259
return;
260
}
261
0 commit comments