初级会员

- 积分
- 52
- 金钱
- 52
- 注册时间
- 2016-1-20
- 在线时间
- 15 小时
|
1金钱
else if(DeviceMode==SD_DMA_MODE)
{
TransferError=SD_OK;
StopCondition=1;
TransferEnd=0;
SDIO->MASK|=(1<<1)|(1<<3)|(1<<8)|(1<<5)|(1<<9);
SD_DMA_Config((u32*)buf,nblks*blksize,DMA_DIR_PeripheralToMemory);
SDIO->DCTRL|=1<<3;
while(((DMA2->LISR&(1<<27))==RESET)&&timeout)timeout--;
if(timeout==0)return SD_DATA_TIMEOUT;
while((TransferEnd==0)&&(TransferError==SD_OK));
if(TransferError!=SD_OK)errorstatus=TransferError;
}
return errorstatus;
|
|