# sdmmc_request Struct Reference

Asynchronous SD/MMC request. More...

`#include <sdmmc.h>`

Collaboration diagram for sdmmc_request:

[legend]

## Data Fields
struct slist | buf_list
| List of buffers associated with this request.
struct slist_node | node
| List node for use by the SD/MMC driver.
struct sdmmc_command | cmd
struct sdmmc_slot * | slot
uint32_t | blocks
uint32_t | block_size
unsigned long | flags
| Flag bitfield. See sdmmc_req_flag.
void(* | req_started )(struct sdmmc_request *req)
| Callback called when request becomes active.
void(* | req_done )(struct sdmmc_request *req)
| Callback called when request is done.
void(* | buf_list_done )(struct sdmmc_request *req, struct slist *buf_list)
| Callback called when a list of buffers associated with req is done.
void * | context
| Arbitrary data for use by the client.
int | status
| Status indicating success or failure.
size_t | bytes_xfered
| The number of bytes that were successfully transfered.

## Detailed Description

Asynchronous SD/MMC request.

Definition at line 128 of file sdmmc.h.

## Field Documentation

uint32_t sdmmc_request::block_size

Block size in a data transfer

Definition at line 140 of file sdmmc.h.

Referenced by sdmmc_mcihost_load_data(), sdmmc_req_init(), sdmmc_req_prep_data(), and sdmmc_req_prep_transfer().

uint32_t sdmmc_request::blocks

Number of blocks in a data transfer

Definition at line 138 of file sdmmc.h.

Referenced by sdmmc_mcihost_load_data(), sdmmc_req_init(), sdmmc_req_prep_data(), and sdmmc_req_prep_transfer().

struct slist sdmmc_request::buf_list`[read]`

List of buffers associated with this request.

Definition at line 130 of file sdmmc.h.

Referenced by sdmmc_mcihost_load_data(), sdmmc_req_init(), and sdmmc_req_prep_data().

void(* sdmmc_request::buf_list_done)(struct sdmmc_request *req, struct slist *buf_list)

Callback called when a list of buffers associated with req is done.

Parameters:

  | req | The request
  | buf_list | List of completed buffers

Referenced by sdmmc_mcihost_load_data().

size_t sdmmc_request::bytes_xfered

The number of bytes that were successfully transfered.

Definition at line 166 of file sdmmc.h.

Referenced by sdmmc_mcihost_load_data().

struct sdmmc_command sdmmc_request::cmd`[read]`

Command to execute

Definition at line 134 of file sdmmc.h.

Referenced by sdmmc_req_prep_cmd().

void* sdmmc_request::context

Arbitrary data for use by the client.

Definition at line 162 of file sdmmc.h.

Referenced by sdmmc_req_prep_callback().

unsigned long sdmmc_request::flags

Flag bitfield. See sdmmc_req_flag.

Definition at line 142 of file sdmmc.h.

Referenced by sdmmc_req_init(), and sdmmc_req_prep_transfer().

struct slist_node sdmmc_request::node`[read]`

List node for use by the SD/MMC driver.

Definition at line 132 of file sdmmc.h.

void(* sdmmc_request::req_done)(struct sdmmc_request *req)

Callback called when request is done.

Parameters:

  | req | The request

Referenced by sdmmc_req_prep_callback().

void(* sdmmc_request::req_started)(struct sdmmc_request *req)

Callback called when request becomes active.

Parameters:

  | req | The request

struct sdmmc_slot* sdmmc_request::slot`[read]`

Slot this request is aimed for

Definition at line 136 of file sdmmc.h.

Referenced by sdmmc_slot_submit_req().

int sdmmc_request::status

Status indicating success or failure.

Definition at line 164 of file sdmmc.h.

Referenced by sdmmc_mcihost_load_data().

The documentation for this struct was generated from the following file:

- include/sdmmc/sdmmc.h