File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 23
23
#include "stm_list.h"
24
24
#include "shci_tl.h"
25
25
#include "stm32_def.h"
26
+ #include "wiring_time.h"
26
27
27
28
/* Private typedef -----------------------------------------------------------*/
28
29
typedef enum
@@ -250,11 +251,12 @@ static void TlUserEvtReceived(TL_EvtPacket_t *shcievt)
250
251
/* Weak implementation ----------------------------------------------------------------*/
251
252
__WEAK void shci_cmd_resp_wait (uint32_t timeout )
252
253
{
253
- (void )timeout ;
254
-
255
254
CmdRspStatusFlag = SHCI_TL_CMD_RESP_WAIT ;
256
- while (CmdRspStatusFlag != SHCI_TL_CMD_RESP_RELEASE );
257
-
255
+ for (unsigned long start = millis (); (millis () - start ) < timeout ;) {
256
+ if (CmdRspStatusFlag == SHCI_TL_CMD_RESP_RELEASE ) {
257
+ break ;
258
+ }
259
+ }
258
260
return ;
259
261
}
260
262
You can’t perform that action at this time.
0 commit comments