亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sdmmc_mci.c

?? at91sam7a3 keil下sdcard驅(qū)動
?? C
?? 第 1 頁 / 共 3 頁
字號:
/// Addressed card sends its card-specific
/// data (CSD) on the CMD line.
/// Returns the command transfer result (see SendCommand).
/// \param pSd  Pointer to a SD card driver instance.
//------------------------------------------------------------------------------
static unsigned char Cmd9(SdCard *pSd)
{
    SdCmd *pCommand = &(pSd->command);
    unsigned char error;

    TRACE_DEBUG("Cmd9()\n\r");
    memset(pCommand, 0, sizeof(SdCmd));
    // Fill command information
    pCommand->cmd = AT91C_SEND_CSD_CMD;
    pCommand->arg = pSd->cardAddress << 16;
    pCommand->resType = 2;
    pCommand->pResp = pSd->csd;
    // Set SD command state
    pSd->state = SD_STATE_STBY;

    // Send command
    error = SendCommand(pSd);
    return error;
}


//------------------------------------------------------------------------------
/// Forces the card to stop transmission
/// \param pSd  Pointer to a SD card driver instance.
/// \param pStatus  Pointer to a status variable.
//------------------------------------------------------------------------------
static unsigned char Cmd12(SdCard *pSd)
{
    SdCmd *pCommand = &(pSd->command);
    unsigned char error;
    unsigned int response;

    TRACE_DEBUG("Cmd12()\n\r");
    memset(pCommand, 0, sizeof(SdCmd));
    // Fill command information
    pCommand->cmd = AT91C_STOP_TRANSMISSION_CMD;
    pCommand->conTrans = MCI_NEW_TRANSFER;
    pCommand->resType = 1;
    pCommand->pResp = &response;
    // Set SD command state
    pSd->state = SD_STATE_STBY;

    // Send command
    error = SendCommand(pSd);

    return error;
}

//------------------------------------------------------------------------------
/// Addressed card sends its status register.
/// Returns the command transfer result (see SendCommand).
/// \param pSd  Pointer to a SD card driver instance.
/// \param pStatus  Pointer to a status variable.
//------------------------------------------------------------------------------
static unsigned char Cmd13(SdCard *pSd, unsigned int *pStatus)
{
    SdCmd *pCommand = &(pSd->command);
    unsigned char error;

    TRACE_DEBUG("Cmd13()\n\r");
    memset(pCommand, 0, sizeof(SdCmd));
    // Fill command information
    pCommand->cmd = AT91C_SEND_STATUS_CMD;
    pCommand->arg = pSd->cardAddress << 16;
    pCommand->resType = 1;
    pCommand->pResp = pStatus;
    // Set SD command state
    pSd->state = SD_STATE_STBY;

    // Send command
    error = SendCommand(pSd);

    return error;
}

//------------------------------------------------------------------------------
/// In the case of a Standard Capacity SD Memory Card, this command sets the
/// block length (in bytes) for all following block commands (read, write, lock).
/// Default block length is fixed to 512 Bytes.
/// Set length is valid for memory access commands only if partial block read
/// operation are allowed in CSD.
/// In the case of a High Capacity SD Memory Card, block length set by CMD16
/// command does not affect the memory read and write commands. Always 512
/// Bytes fixed block length is used. This command is effective for LOCK_UNLOCK command.
/// In both cases, if block length is set larger than 512Bytes, the card sets the
/// BLOCK_LEN_ERROR bit.
/// \param pSd  Pointer to a SD card driver instance.
/// \param blockLength  Block length in bytes.
//------------------------------------------------------------------------------
static unsigned char Cmd16(SdCard *pSd, unsigned short blockLength)
{
    SdCmd *pCommand = &(pSd->command);
    unsigned char error;
    unsigned int response;

    TRACE_DEBUG("Cmd16()\n\r");
    memset(pCommand, 0, sizeof(SdCmd));
    // Fill command information
    pCommand->cmd = AT91C_SET_BLOCKLEN_CMD;
    pCommand->arg = blockLength;
    pCommand->resType = 1;
    pCommand->pResp = &response;
    // Set SD command state
    pSd->state = SD_STATE_STBY;

    // Send command
    error = SendCommand(pSd);

    return error;
}

//------------------------------------------------------------------------------
/// Continously transfers datablocks from card to host until interrupted by a
/// STOP_TRANSMISSION command.
/// \param pSd  Pointer to a SD card driver instance.
/// \param blockSize  Block size (shall be set to 512 in case of high capacity).
/// \param pData  Pointer to the application buffer to be filled.
/// \param address  SD card address.
//------------------------------------------------------------------------------
static unsigned char Cmd18(SdCard *pSd,
                           unsigned short nbBlock,
                           unsigned char *pData,
                           unsigned int address)
{
    SdCmd *pCommand = &(pSd->command);
    unsigned char error;
    unsigned int response;

    TRACE_DEBUG("Cmd18()\n\r");
    memset(pCommand, 0, sizeof(SdCmd));
    // Fill command information
    pCommand->cmd = AT91C_READ_MULTIPLE_BLOCK_CMD;
    pCommand->arg = address;
    pCommand->blockSize = SD_BLOCK_SIZE;
    pCommand->nbBlock = nbBlock;
    pCommand->pData = pData;
    pCommand->isRead = 1;
    pCommand->conTrans = MCI_NEW_TRANSFER;
    pCommand->resType = 1;
    pCommand->pResp = &response;
    // Set SD command state
    pSd->state = SD_STATE_DATA;

    // Send command
    error = SendCommand(pSd);

    return error;
}

//------------------------------------------------------------------------------
/// Write block command
/// \param pSd  Pointer to a SD card driver instance.
/// \param blockSize  Block size (shall be set to 512 in case of high capacity).
/// \param pData  Pointer to the application buffer to be filled.
/// \param address  SD card address.
//------------------------------------------------------------------------------
static unsigned char Cmd25(SdCard *pSd,
                           unsigned short nbBlock,
                           unsigned char *pData,
                           unsigned int address)
{
    SdCmd *pCommand = &(pSd->command);
    unsigned char error;
    unsigned int response;

    TRACE_DEBUG("Cmd25()\n\r");
    memset(pCommand, 0, sizeof(SdCmd));
    // Fill command information
    pCommand->cmd = AT91C_WRITE_MULTIPLE_BLOCK_CMD;
    pCommand->arg = address;
    pCommand->blockSize = SD_BLOCK_SIZE;
    pCommand->nbBlock = nbBlock;
    pCommand->pData = (unsigned char *) pData;
    pCommand->conTrans = MCI_NEW_TRANSFER;
    pCommand->resType = 1;
    pCommand->pResp = &response;

    // Set SD command state
    pSd->state = SD_STATE_RCV;

    // Send command
    //return SendCommand(pSd);
    error = SendCommand(pSd);
    return error;
}


//------------------------------------------------------------------------------
/// Initialization delay: The maximum of 1 msec, 74 clock cycles and supply
/// ramp up time.
/// Returns the command transfer result (see SendCommand).
/// \param pSd  Pointer to a SD card driver instance.
//------------------------------------------------------------------------------
static unsigned char Cmd55(SdCard *pSd)
{
    SdCmd *pCommand = &(pSd->command);
    unsigned char error;
    unsigned int response;

    TRACE_DEBUG("Cmd55()\n\r");
    memset(pCommand, 0, sizeof(SdCmd));
    // Fill command information
    pCommand->cmd = AT91C_APP_CMD;
    pCommand->arg = (pSd->cardAddress << 16);
    pCommand->resType = 1;
    pCommand->pResp = &response;
    // Set SD command state
    pSd->state = SD_STATE_STBY;

    // Send command
    //return SendCommand(pSd);
    error = SendCommand(pSd);

    return error;
}

//------------------------------------------------------------------------------
/// SPI Mode, Reads the OCR register of a card
/// Returns the command transfer result (see SendCommand).
/// \param pSd  Pointer to a SD card driver instance.
/// \param pOcr   OCR value of the card
//------------------------------------------------------------------------------
static unsigned char Cmd58(SdCard *pSd, unsigned int *pOcr)
{
    SdCmd *pCommand = &(pSd->command);
    unsigned char error;
    unsigned int response[2];

    TRACE_DEBUG("Cmd58()\n\r");
    memset(pCommand, 0, sizeof(SdCmd));
    // Fill command information
    pCommand->cmd = AT91C_READ_OCR_CMD;
    pCommand->resType = 3;
    pCommand->pResp = &response[0];

    // Set SD command state
    pSd->state = SD_STATE_STBY;

    // Send command
    error = SendCommand(pSd);
    return error;
}

//------------------------------------------------------------------------------
/// SPI Mode, Set CRC option of a card
/// Returns the command transfer result (see SendCommand).
/// \param pSd  Pointer to a SD card driver instance.
/// \param option  CRC option, 1 to turn on, 0 to trun off
//------------------------------------------------------------------------------
static unsigned char Cmd59(SdCard *pSd, unsigned char option)
{
    SdCmd *pCommand = &(pSd->command);
    unsigned char error;
    unsigned int response;

    TRACE_DEBUG("Cmd59()\n\r");
    memset(pCommand, 0, sizeof(SdCmd));
    // Fill command information
    pCommand->cmd = AT91C_CRC_ON_OFF_CMD;
    pCommand->arg = (option & 0x1);
    pCommand->resType = 1;
    pCommand->pResp = &response;

    // Set SD command state
    pSd->state = SD_STATE_STBY;

    // Send command
    error = SendCommand(pSd);

    return error;
}

//------------------------------------------------------------------------------
/// Defines the data bus width (

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
3d动漫精品啪啪1区2区免费| 丁香激情综合国产| 欧美高清www午色夜在线视频| 亚洲免费高清视频在线| 欧美午夜一区二区| 日av在线不卡| 2024国产精品视频| 国产精品影视天天线| 国产精品视频第一区| 91在线国产观看| 亚洲动漫第一页| 日韩精品一区二区三区四区| 国产在线不卡一区| 日韩高清一区二区| 欧美变态tickle挠乳网站| 国产老女人精品毛片久久| 国产精品视频一区二区三区不卡| 99国产精品视频免费观看| 性感美女久久精品| 精品国产制服丝袜高跟| 91网上在线视频| 日产国产高清一区二区三区| 国产亚洲自拍一区| 欧洲视频一区二区| 国产在线国偷精品产拍免费yy | 国内偷窥港台综合视频在线播放| 久久综合久久久久88| aaa欧美色吧激情视频| 婷婷成人综合网| 国产欧美视频一区二区| 欧美视频在线播放| 国产精品一区二区久激情瑜伽| 成人免费在线播放视频| 日韩一级片网站| 一本色道亚洲精品aⅴ| 久久精品国产99国产精品| 最新热久久免费视频| 欧美一区二区黄色| 色婷婷久久久综合中文字幕| 久久精品999| 一区二区三区在线高清| 精品粉嫩aⅴ一区二区三区四区 | 日本丰满少妇一区二区三区| 精品无人区卡一卡二卡三乱码免费卡| 日本美女一区二区三区| 国产精品久久久久久久久免费丝袜| 欧美影片第一页| 成人污视频在线观看| 日韩不卡手机在线v区| 亚洲女同一区二区| 中文字幕成人在线观看| 精品久久人人做人人爱| 欧美日韩一级黄| 91丨九色porny丨蝌蚪| 国产精品一二三四区| 青青草成人在线观看| 亚洲第一久久影院| 亚洲日本va午夜在线电影| 久久久久99精品一区| 日韩精品一区二区三区中文精品 | 成人黄色电影在线| 国产美女精品一区二区三区| 日本aⅴ精品一区二区三区| 香蕉久久一区二区不卡无毒影院 | 蜜桃av一区二区| 亚洲一区二区影院| 亚洲卡通欧美制服中文| 国产精品视频一二三| 欧美极品xxx| 国产无遮挡一区二区三区毛片日本| 日韩网站在线看片你懂的| av男人天堂一区| 欧美色手机在线观看| 99精品黄色片免费大全| 高清国产午夜精品久久久久久| 欧美一级一区二区| 国产精品国产三级国产三级人妇| 国产精品一区二区不卡| 欧美va在线播放| 亚洲一区二区三区四区在线 | 久久久99久久| 国产毛片精品一区| 国产亚洲一二三区| 懂色av一区二区三区免费观看 | 亚洲色欲色欲www| 91亚洲精品一区二区乱码| 亚洲免费大片在线观看| 欧美视频精品在线观看| 午夜精品一区在线观看| 欧美精品777| 国产综合成人久久大片91| 中文字幕 久热精品 视频在线| 风流少妇一区二区| 一区二区三区日本| 91精品国产91久久久久久一区二区 | 国产福利视频一区二区三区| 中文字幕免费在线观看视频一区| 成人国产精品免费观看| 亚洲精品视频一区| 欧美日韩精品综合在线| 国产一区在线不卡| 成人免费一区二区三区在线观看 | 精品一区二区成人精品| 国产精品久久久一本精品| 欧美视频一区二区三区在线观看| 美日韩一级片在线观看| 国产精品乱码一区二三区小蝌蚪| 色狠狠桃花综合| 激情综合色播五月| 日韩久久一区二区| 日韩视频一区二区在线观看| 夫妻av一区二区| 日韩黄色小视频| 久久精品一区四区| 欧美亚洲动漫精品| 国产成人亚洲综合a∨婷婷图片| 久久一区二区三区四区| 色爱区综合激月婷婷| 国产一区欧美日韩| 亚洲一二三四在线| 中文av一区二区| 日韩女优毛片在线| 欧美日韩午夜影院| 97久久精品人人做人人爽| 国模冰冰炮一区二区| 一区二区三区四区精品在线视频| 欧美精品在欧美一区二区少妇| 毛片av一区二区| 亚洲蜜臀av乱码久久精品蜜桃| 欧美日韩一区二区在线观看 | 成人一级黄色片| 婷婷久久综合九色综合伊人色| 国产精品第四页| 久久久久97国产精华液好用吗| 久久久天堂av| 国产毛片精品国产一区二区三区| 午夜精品在线视频一区| 亚洲精品水蜜桃| 亚洲欧洲日产国码二区| 国产女人18水真多18精品一级做| 日韩欧美三级在线| 欧美一区三区二区| 欧美日韩一级片在线观看| 在线日韩av片| 91官网在线免费观看| 91久久精品一区二区三区| av毛片久久久久**hd| 成人深夜福利app| 成人激情午夜影院| 成人av在线一区二区三区| 国产高清不卡二三区| 国产成人精品一区二| 国产**成人网毛片九色| 国产一区二区三区美女| 黑人巨大精品欧美一区| 极品少妇一区二区| 精品一区二区三区免费观看| 久热成人在线视频| 国产精品1区二区.| 国产精品一区在线| 日韩电影在线免费观看| 久久91精品国产91久久小草 | 国产精品每日更新在线播放网址| 色综合久久中文综合久久牛| 免费观看在线色综合| 亚洲成人综合在线| 亚洲成a人v欧美综合天堂下载| 亚洲免费观看高清| 亚洲免费视频中文字幕| 亚洲激情在线播放| 一区二区三区在线视频观看| 午夜精品成人在线| 久久99热99| 99亚偷拍自图区亚洲| 欧美日韩一级二级| 精品欧美久久久| 国产精品对白交换视频| 性久久久久久久久久久久| 日产欧产美韩系列久久99| 国产在线播放一区二区三区| av不卡一区二区三区| 欧美精品在线观看一区二区| 欧美精品一区二| 亚洲激情av在线| 美国毛片一区二区| 一本大道久久精品懂色aⅴ| 91麻豆精品国产自产在线| 国产欧美一区二区精品久导航 | av在线不卡电影| 欧美在线观看你懂的| xfplay精品久久| 亚洲免费观看在线视频| 久久成人免费电影| 在线观看免费亚洲| 国产日韩精品一区二区三区在线| 亚洲精品免费视频| 国产一区美女在线| 欧美日韩三级一区| 亚洲视频一区二区在线观看| 国产一区二区三区四区在线观看|