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 2323#include "stm_list.h"
2424#include "shci_tl.h"
2525#include "stm32_def.h"
26+ #include "wiring_time.h"
2627
2728/* Private typedef -----------------------------------------------------------*/
2829typedef enum
@@ -250,11 +251,12 @@ static void TlUserEvtReceived(TL_EvtPacket_t *shcievt)
250251/* Weak implementation ----------------------------------------------------------------*/
251252__WEAK void shci_cmd_resp_wait (uint32_t timeout )
252253{
253- (void )timeout ;
254-
255254 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+ }
258260 return ;
259261}
260262
You can’t perform that action at this time.
0 commit comments