File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
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
@@ -234,10 +235,12 @@ static void TlUserEvtReceived(TL_EvtPacket_t *shcievt)
234235/* Weak implementation ----------------------------------------------------------------*/
235236__WEAK void shci_cmd_resp_wait (uint32_t timeout )
236237{
237- (void )timeout ;
238-
239238 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+ }
241244}
242245
243246__WEAK void shci_cmd_resp_release (uint32_t flag )
You can’t perform that action at this time.
0 commit comments