Lines Matching refs:num_blocks
491 static int card_read(struct sd_card *card, uint8_t *rbuf, uint32_t start_block, uint32_t num_blocks) in card_read() argument
509 cmd.opcode = (num_blocks == 1U) ? SD_READ_SINGLE_BLOCK : SD_READ_MULTIPLE_BLOCK; in card_read()
522 data.blocks = num_blocks; in card_read()
526 LOG_DBG("READ: Sector = %u, Count = %u", start_block, num_blocks); in card_read()
544 int card_read_blocks(struct sd_card *card, uint8_t *rbuf, uint32_t start_block, uint32_t num_blocks) in card_read_blocks() argument
551 if ((start_block + num_blocks) > card->block_count) { in card_read_blocks()
581 while (sector < num_blocks) { in card_read_blocks()
597 ret = card_read(card, rbuf, start_block, num_blocks); in card_read_blocks()
654 uint32_t num_blocks) in card_write() argument
665 cmd.opcode = (num_blocks == 1) ? SD_WRITE_SINGLE_BLOCK : SD_WRITE_MULTIPLE_BLOCK; in card_write()
678 data.blocks = num_blocks; in card_write()
682 LOG_DBG("WRITE: Sector = %u, Count = %u", start_block, num_blocks); in card_write()
696 LOG_ERR("Only %d blocks of %d were written", blocks, num_blocks); in card_write()
710 uint32_t num_blocks) in card_write_blocks() argument
717 if ((start_block + num_blocks) > card->block_count) { in card_write_blocks()
746 while (sector < num_blocks) { in card_write_blocks()
762 ret = card_write(card, wbuf, start_block, num_blocks); in card_write_blocks()