MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / FSdCtrl_DoACmd

Function FSdCtrl_DoACmd

bsp/ft2004/libraries/bsp/ft_sd/ft_sdctrl.c:491–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

489}
490
491void FSdCtrl_DoACmd(FT_INOUT FtsdCtrl_t *pFtsdCtrl,
492 FT_IN u32 cmdIndex,
493 FT_IN u32 rspType,
494 u32 arg)
495{
496 u32 cmd;
497
498 FSdCtrl_Config_t *pConfig;
499 Ft_assertVoid(FT_NULL != pFtsdCtrl);
500 pConfig = &pFtsdCtrl->config;
501
502 /* clear normal interrupt status */
503 Ft_out32(pConfig->baseAddress + NORMAL_INT_STATUS_REG, NORMAL_INT_EN_ECC);
504 /* set command*/
505 cmd = FSdCtrl_PrepareCmdRaw(cmdIndex, rspType);
506 cmd |= CMD_SETTING_TRTY(2);
507 Ft_out32(pConfig->baseAddress + CMD_SETTING_REG_OFFSET, cmd);
508}
509
510void FSdCtrl_WriteWaitRegister(FT_INOUT FtsdCtrl_t *pFtsdCtrl, FT_IN pFtsdCtrl_irqWaitCallback_t callBack)
511{

Callers 1

Calls 2

Ft_out32Function · 0.85
FSdCtrl_PrepareCmdRawFunction · 0.85

Tested by

no test coverage detected