class SdioProtocolClient

Defined at line 248 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

Public Members

static const uint32_t kProtocolId

Public Methods

void SdioProtocolClient ()

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

void SdioProtocolClient (const sdio_protocol_t * proto)

Defined at line 255 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

void SdioProtocolClient (zx_device_t * parent)

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

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

Defined at line 269 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

zx_status_t CreateFromDevice (zx_device_t * parent, SdioProtocolClient * result)

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

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

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

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

Create a SdioProtocolClient from the given parent device.

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

Defined at line 298 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

void GetProto (sdio_protocol_t * proto)

Defined at line 310 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

bool is_valid ()

Defined at line 314 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

void clear ()

Defined at line 317 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

zx_status_t GetDevHwInfo (sdio_hw_info_t * out_hw_info)

Defined at line 322 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

zx_status_t EnableFn ()

Defined at line 326 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

zx_status_t DisableFn ()

Defined at line 330 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

zx_status_t EnableFnIntr ()

Defined at line 334 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

zx_status_t DisableFnIntr ()

Defined at line 338 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

zx_status_t UpdateBlockSize (uint16_t blk_sz, bool deflt)

Defined at line 342 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

zx_status_t GetBlockSize (uint16_t * out_cur_blk_size)

Defined at line 346 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

zx_status_t DoRwByte (bool write, uint32_t addr, uint8_t write_byte, uint8_t * out_read_byte)

Defined at line 350 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

zx_status_t GetInBandIntr (zx::interrupt * out_irq)

Returns a virtual interrupt that will be triggered by the SDIO driver when the card signals

an interrupt corresponding to this function. No additional interrupts will be triggered

until `AckInBandIntr()` is called.

Defined at line 357 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

void AckInBandIntr ()

See above. Clients should call `AckInBandIntr()` after starting to wait on the interrupt

object just in case there is already an in-band interrupt pending for this function.

Defined at line 363 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

zx_status_t IoAbort ()

The following functions access the card common control registers (CCCR) on function 0.

Aborts an I/O operation occurring on the specified function.

Defined at line 369 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

zx_status_t IntrPending (bool * out_pending)

Returns true if an interrupt is pending for function fn_idx, false otherwise.

Defined at line 374 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

zx_status_t DoVendorControlRwByte (bool write, uint8_t addr, uint8_t write_byte, uint8_t * out_read_byte)

Reads or writes to a vendor CCCR register. addr must be in [0xF0, 0xFF].

Defined at line 379 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

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

Defined at line 383 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

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

Defined at line 387 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

zx_status_t DoRwTxn (const sdio_rw_txn_t * txn)

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 DoRwTxn 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 405 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

zx_status_t RequestCardReset ()

Requests that the core driver hard reset the card and perform the SDIO initialization

sequence again. The callback will be called after the card has been re-initialized, and in

the meantime all IO calls from this client will return ZX_ERR_SHOULD_WAIT. If an error

occurs during initialization then all subsequent IO calls will return ZX_ERR_IO_NOT_PRESENT.

The only way to recover from this situation would be to call `RequestCardReset()` again.

The SDIO core driver will wait for all clients to call this method before performing the

reset and re-initialization. After the reset clients will have to perform their own

initialization steps again, such as calling `EnableFnIntr()` or `UpdateBlockSize()`.

VMO registration methods can always be called regardless of the reset state.

The specific method used to hard reset the card is platform- or board-specific; examples

include toggling a reset GPIO or power cycling the card.

Defined at line 423 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h

zx_status_t PerformTuning ()

Perform tuning in the background. Clients can use this to update the host controller delay

settings in case the bus delay has changed due to temperature or other factors. For example,

clients could call this periodically, or only in response to data CRC errors. The amount of

time this call takes (and the amount of time that other requests are blocked for) is

controller-dependent.

Returns `ZX_ERR_ALREADY_BOUND` if another call to `PerformTuning()` is already pending.

Otherwise returns `ZX_OK` or an error value if the SDMMC driver's tuning process failed (see

the [SDMMC protocol](/sdk/banjo/fuchsia.hardware.sdmmc/sdmmc.fidl)).

Defined at line 436 of file fidling/gen/sdk/banjo/fuchsia.hardware.sdio/fuchsia.hardware.sdio/banjo/cpp/fuchsia/hardware/sdio/cpp/banjo.h