# drivers/sdmmc/request.c File Reference

SD/MMC request utility functions. More...

`#include <bitops.h>`
`#include <byteorder.h>`
`#include <debug.h>`
`#include <stdbool.h>`
`#include <string.h>`
`#include <util.h>`
`#include <sdmmc/sdmmc.h>`
`#include "protocol.h"`

Include dependency graph for request.c:

Go to the source code of this file.

## Functions
void | sdmmc_req_prep_transfer (struct sdmmc_slot *slot, struct sdmmc_request *req, uint32_t lba, uint32_t nr_blocks, bool write)
| Prepare SD/MMC request for data transfer.

## Detailed Description

SD/MMC request utility functions.

- Compiler: IAR EWAVR32 and GNU GCC for AVR32
- Supported devices: All devices
- AppNote:

Author:
  Atmel Corporation: http://www.atmel.com
  Support and FAQ: http://support.atmel.no/

Definition in file request.c.

## Function Documentation

void sdmmc_req_prep_transfer | ( | struct sdmmc_slot * | slot,
|  | struct sdmmc_request * | req,
|  | uint32_t | lba,
|  | uint32_t | nr_blocks,
|  | bool | write |
| ) |  |  |

Prepare SD/MMC request for data transfer.

Parameters:

  | slot | Slot this request is intended for
  | req | Request
  | lba | Logical Block Address
  | nr_blocks | Number of block to transfer
  | write | Set to true for write request and to false for read request

Definition at line 51 of file request.c.

References sdmmc_card::block_size, sdmmc_request::block_size, sdmmc_request::blocks, sdmmc_slot::card, sdmmc_request::flags, sdmmc_card_block2addr(), sdmmc_req_prep_cmd(), SDMMC_REQ_STOP, SDMMC_REQ_WRITE, and set_bit().

Here is the call graph for this function: