File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
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
@@ -234,10 +235,12 @@ static void TlUserEvtReceived(TL_EvtPacket_t *shcievt)
234
235
/* Weak implementation ----------------------------------------------------------------*/
235
236
__WEAK void shci_cmd_resp_wait (uint32_t timeout )
236
237
{
237
- (void )timeout ;
238
-
239
238
CmdRspStatusFlag = SHCI_TL_CMD_RESP_WAIT ;
240
- while (CmdRspStatusFlag != SHCI_TL_CMD_RESP_RELEASE );
239
+ for (unsigned long start = millis (); (millis () - start ) < timeout ;) {
240
+ if (CmdRspStatusFlag == SHCI_TL_CMD_RESP_RELEASE ) {
241
+ break ;
242
+ }
243
+ }
241
244
}
242
245
243
246
__WEAK void shci_cmd_resp_release (uint32_t flag )
You can’t perform that action at this time.
0 commit comments