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

Function FSdCtrl_DoCmd

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

Source from the content-addressed store, hash-verified

463}
464
465void FSdCtrl_DoCmd(FT_INOUT FtsdCtrl_t *pFtsdCtrl,
466 FT_IN u32 cmdIndex,
467 FT_IN u32 rspType,
468 u32 arg)
469{
470 u32 cmd;
471
472 FSdCtrl_Config_t *pConfig;
473 Ft_assertVoid(FT_NULL != pFtsdCtrl);
474 pConfig = &pFtsdCtrl->config;
475
476 /* clear normal interrupt status */
477 Ft_out32(pConfig->baseAddress + NORMAL_INT_STATUS_REG, NORMAL_INT_STATUS_EI);
478
479 /* set command*/
480 cmd = FSdCtrl_PrepareCmdRaw(cmdIndex, rspType);
481 Ft_out32(pConfig->baseAddress + CMD_SETTING_REG_OFFSET, cmd);
482
483 if (cmdIndex == 41)
484 {
485 arg = 0x40ff8000;
486 }
487
488 Ft_out32(pConfig->baseAddress + ARGUMENT_REG_OFFSET, arg);
489}
490
491void FSdCtrl_DoACmd(FT_INOUT FtsdCtrl_t *pFtsdCtrl,
492 FT_IN u32 cmdIndex,

Callers 1

rthw_sdctrl_docmdFunction · 0.85

Calls 2

Ft_out32Function · 0.85
FSdCtrl_PrepareCmdRawFunction · 0.85

Tested by

no test coverage detected