class SdmmcProtocolClient

Defined at line 178 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

Public Members

static const uint32_t kProtocolId

Public Methods

void SdmmcProtocolClient ()

Defined at line 183 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

void SdmmcProtocolClient (const sdmmc_protocol_t * proto)

Defined at line 185 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

void SdmmcProtocolClient (zx_device_t * parent)

Defined at line 188 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

void SdmmcProtocolClient (zx_device_t * parent, const char * fragment_name)

Defined at line 199 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

zx_status_t CreateFromDevice (zx_device_t * parent, SdmmcProtocolClient * result)

Create a SdmmcProtocolClient from the given parent device + "fragment".

If ZX_OK is returned, the created object will be initialized in |result|.

Defined at line 213 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

zx_status_t CreateFromDevice (zx_device_t * parent, const char * fragment_name, SdmmcProtocolClient * result)

Create a SdmmcProtocolClient from the given parent device.

If ZX_OK is returned, the created object will be initialized in |result|.

Defined at line 228 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

void GetProto (sdmmc_protocol_t * proto)

Defined at line 240 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

bool is_valid ()

Defined at line 244 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

void clear ()

Defined at line 247 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

zx_status_t HostInfo (sdmmc_host_info_t * out_info)

Get host info.

Defined at line 253 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

zx_status_t SetSignalVoltage (sdmmc_voltage_t voltage)

Set signal voltage.

Defined at line 258 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

zx_status_t SetBusWidth (sdmmc_bus_width_t bus_width)

Set bus width.

Defined at line 263 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

zx_status_t SetBusFreq (uint32_t bus_freq)

Set bus frequency, zero means disable the clock to the card.

Defined at line 268 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

zx_status_t SetTiming (sdmmc_timing_t timing)

Set mmc timing.

Defined at line 273 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

zx_status_t HwReset ()

Issue a hw reset.

Defined at line 278 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

zx_status_t PerformTuning (uint32_t cmd_idx)

Perform tuning.

Defined at line 283 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

zx_status_t RegisterVmo (uint32_t vmo_id, uint8_t client_id, zx::vmo vmo, uint64_t offset, uint64_t size, uint32_t vmo_rights)

In the methods below, vmo_id is used to uniquely identify a VMO that will be passed to

Request in an SdmmcBufferRegion. VMO IDs are chosen by the caller, and may be any uint32

value.

Registers a VMO and transfers ownership to the protocol implementation. vmo_rights is a bit

field containing SdmmcVmoRight values, and determines the read/write permissions used by

the implementation when pinning or mapping the VMO. The implementation may pin vmo during

this call or any time it is used in a request, and may keep it pinned until the VMO is

unregistered. client_id may be in [0, SDMMC_MAX_CLIENT_ID] and identifies the ID space for

this VMO to be registered in (that is, two different VMOs may use the same ID if they are

registered for different clients).

Defined at line 297 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

zx_status_t UnregisterVmo (uint32_t vmo_id, uint8_t client_id, zx::vmo * out_vmo)

The callee unmaps/unpins the VMO and returns ownership to the caller.

Defined at line 302 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h

zx_status_t Request (const sdmmc_req_t * req, uint32_t[4] out_response)

Perform the request. The protocol implementation chooses whether or not to use DMA depending

on the properties of the request and the capabilities of the controller.

Clients are responsible for performing the following cache operations:

After read requests:

- Call zx_cache_flush with ZX_CACHE_FLUSH_DATA | ZX_CACHE_FLUSH_INVALIDATE on buffers that

have been mapped by the client.

- Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN_INVALIDATE on all other buffers.

Note that writing to any portion of a buffer before Request has returned can corrupt the

received data.

Before write requests:

- Call zx_cache_flush with ZX_CACHE_FLUSH_DATA on buffers that have been mapped by the

client.

- Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN on all other buffers.

Defined at line 323 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdmmc/fuchsia.hardware.sdmmc/banjo/cpp/fuchsia/hardware/sdmmc/cpp/banjo.h