Ensure interrups are back in BEFORE running code dependant on clock_systimer

This commit is contained in:
David Sidrane 2017-03-08 11:46:00 -10:00
parent 7ad9c7c6e8
commit 5158af0da6

View File

@ -2916,6 +2916,8 @@ void sdhc_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot)
priv->cdstatus &= ~SDIO_STATUS_PRESENT; priv->cdstatus &= ~SDIO_STATUS_PRESENT;
} }
leave_critical_section(flags);
mcinfo("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus); mcinfo("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus);
/* Perform any requested callback if the status has changed */ /* Perform any requested callback if the status has changed */
@ -2924,8 +2926,6 @@ void sdhc_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot)
{ {
kinetis_callback(priv); kinetis_callback(priv);
} }
leave_critical_section(flags);
} }
/**************************************************************************** /****************************************************************************