mirror of
git://projects.qi-hardware.com/antorcha.git
synced 2024-11-22 13:21:53 +02:00
tornado/fw/mmc-hw.c (mmc_activate): allow card to "pre-charge" (Ben needs this)
This commit is contained in:
parent
f449308cc5
commit
c9e36f90a2
@ -104,10 +104,14 @@ void mmc_activate(void)
|
|||||||
SET(MMC_nCS);
|
SET(MMC_nCS);
|
||||||
CLR(MMC_CLK);
|
CLR(MMC_CLK);
|
||||||
OUT(MMC_nCS);
|
OUT(MMC_nCS);
|
||||||
|
SET(MMC_MOSI);
|
||||||
|
SET(MMC_CLK); /* for pre-charging */
|
||||||
OUT(MMC_MOSI);
|
OUT(MMC_MOSI);
|
||||||
OUT(MMC_CLK);
|
OUT(MMC_CLK);
|
||||||
IN(MMC_MISO);
|
IN(MMC_MISO);
|
||||||
|
|
||||||
|
_delay_ms(100); /* allow card to pre-charge, to limit inrush current */
|
||||||
|
|
||||||
CLR(CARD_nPWR);
|
CLR(CARD_nPWR);
|
||||||
|
|
||||||
_delay_ms(10);
|
_delay_ms(10);
|
||||||
|
Loading…
Reference in New Issue
Block a user