Lines Matching refs:start_block
475 static int card_read(struct sd_card *card, uint8_t *rbuf, uint32_t start_block, uint32_t num_blocks) in card_read() argument
496 cmd.arg = start_block * card->block_size; in card_read()
498 cmd.arg = start_block; in card_read()
504 data.block_addr = start_block; in card_read()
510 LOG_DBG("READ: Sector = %u, Count = %u", start_block, num_blocks); in card_read()
529 int card_read_blocks(struct sd_card *card, uint8_t *rbuf, uint32_t start_block, uint32_t num_blocks) in card_read_blocks() argument
536 if ((start_block + num_blocks) > card->block_count) { in card_read_blocks()
568 ret = card_read(card, card->card_buffer, sector + start_block, rlen); in card_read_blocks()
582 ret = card_read(card, rbuf, start_block, num_blocks); in card_read_blocks()
636 static int card_write(struct sd_card *card, const uint8_t *wbuf, uint32_t start_block, in card_write() argument
651 cmd.arg = start_block * card->block_size; in card_write()
653 cmd.arg = start_block; in card_write()
659 data.block_addr = start_block; in card_write()
665 LOG_DBG("WRITE: Sector = %u, Count = %u", start_block, num_blocks); in card_write()
692 int card_write_blocks(struct sd_card *card, const uint8_t *wbuf, uint32_t start_block, in card_write_blocks() argument
700 if ((start_block + num_blocks) > card->block_count) { in card_write_blocks()
733 ret = card_write(card, card->card_buffer, sector + start_block, wlen); in card_write_blocks()
745 ret = card_write(card, wbuf, start_block, num_blocks); in card_write_blocks()