Technical Support
On-Line Manuals
RL-ARM User's Guide (MDK v4)
#include <file_config.h> BOOL Init ( void);
The function Init initializes the Memory Card Interface controller.
The function is part of the MCI Driver. The prototype is defined in the file File_Config.h. Developers have to customize the function.
Init is invoked by the function finit at system startup and when SD/MMC Flash Memory Card Hot Swapping is used.
mci.BusMode, mci.BusSpeed, mci.BusWidth, mci.CheckMedia, mci.Command, mci.Delay, mci.ReadBlock, mci.SetDma, mci.UnInit, mci.WriteBlock
/* MCI Device Driver Control Block */ MCI_DRV mci0_drv = { Init, UnInit, Delay, BusMode, BusWidth, BusSpeed, Command, ReadBlock, WriteBlock, NULL, CheckMedia }; /* Initialize MCI interface. */ static BOOL Init (void) { PCONP |= 0x30000000; /* Power Up the MCI and DMA controller. */ SCS |= 0x08; /* MCIPWR pin is active high. */ /* Required for the silicon rev. 'B' and later. */ PINSEL1 &= ~0x00003FC0; /* Enable MCI pins. */ PINSEL1 |= 0x00002A80; PINSEL4 &= ~0x0FC00000; PINSEL4 |= 0x0A800000; MCI_COMMAND = 0; /* Clear all pending interrupts. */ MCI_DATA_CTRL = 0; MCI_CLEAR = 0x7FF; MCI_POWER = 0x02; /* Power up, switch on VCC for the Flash Card. */ Delay (10000); MCI_POWER |= 0x01; /* Power on the Flash Card. */ return (__TRUE); }
Cookie Settings | Terms of Use | Privacy | Accessibility | Trademarks | Contact Us | Feedback
Copyright © 2005-2019 Arm Limited (or its affiliates). All rights reserved.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
Change Settings
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.