Move some define in sam3x sd implementaion. Define sd speeds macro to clarify the...
[bertos.git] / bertos / cpu / cortex-m3 / drv / hsmci_sam3.c
index 51b79d9cd4723b11a411cdd782c5d8f9dea28734..d09723fc146601be8a16b8a01ab61a949299e0a8 100644 (file)
@@ -179,7 +179,7 @@ void hsmci_waitTransfer(void)
 
 void hsmci_setSpeed(uint32_t data_rate, int flag)
 {
-       if (flag)
+       if (flag & HSMCI_HS_MODE)
                HSMCI_CFG |= BV(HSMCI_CFG_HSMODE);
        else
                HSMCI_CFG &= ~BV(HSMCI_CFG_HSMODE);