1
0
mirror of git://projects.qi-hardware.com/antorcha.git synced 2024-11-25 09:02:47 +02:00

tornado/fw/mmc-hw.c (mmc_activate): allow card to "pre-charge" (Ben needs this)

This commit is contained in:
Werner Almesberger 2012-12-05 10:35:27 -03:00
parent f449308cc5
commit c9e36f90a2

View File

@ -104,10 +104,14 @@ void mmc_activate(void)
SET(MMC_nCS);
CLR(MMC_CLK);
OUT(MMC_nCS);
SET(MMC_MOSI);
SET(MMC_CLK); /* for pre-charging */
OUT(MMC_MOSI);
OUT(MMC_CLK);
IN(MMC_MISO);
_delay_ms(100); /* allow card to pre-charge, to limit inrush current */
CLR(CARD_nPWR);
_delay_ms(10);