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

Function mmc_set_card_addr

components/drivers/sdio/dev_mmc.c:473–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471}
472
473static rt_err_t mmc_set_card_addr(struct rt_mmcsd_host *host, rt_uint32_t rca)
474{
475 rt_err_t err;
476 struct rt_mmcsd_cmd cmd;
477
478 rt_memset(&cmd, 0, sizeof(struct rt_mmcsd_cmd));
479
480 cmd.cmd_code = SET_RELATIVE_ADDR;
481 cmd.arg = rca << 16;
482 cmd.flags = RESP_R1 | CMD_AC;
483
484 err = mmcsd_send_cmd(host, &cmd, 3);
485 if (err)
486 return err;
487
488 return 0;
489}
490
491static int mmc_select_hs200(struct rt_mmcsd_card *card)
492{

Callers 1

mmcsd_mmc_init_cardFunction · 0.85

Calls 2

rt_memsetFunction · 0.85
mmcsd_send_cmdFunction · 0.85

Tested by

no test coverage detected