template <>
class WireServer
Defined at line 4297 of file fidling/gen/sdk/fidl/fuchsia.hardware.sdio/fuchsia.hardware.sdio/cpp/fidl/fuchsia.hardware.sdio/cpp/driver/wire_messaging.h
Pure-virtual interface to be implemented by a server.
This interface uses typed channels (i.e. |::fdf::ClientEnd
<
::fuchsia_hardware_sdio::DriverDevice>|
and |::fdf::ServerEnd
<
::fuchsia_hardware_sdio::DriverDevice>|).
Public Methods
void GetDevHwInfo (fdf::Arena & arena, GetDevHwInfoCompleter::Sync & completer)
void EnableFn (fdf::Arena & arena, EnableFnCompleter::Sync & completer)
void DisableFn (fdf::Arena & arena, DisableFnCompleter::Sync & completer)
void IoReady (fdf::Arena & arena, IoReadyCompleter::Sync & completer)
Returns the value of the I/O Ready bit for this function in CCCR.
void EnableFnIntr (fdf::Arena & arena, EnableFnIntrCompleter::Sync & completer)
void DisableFnIntr (fdf::Arena & arena, DisableFnIntrCompleter::Sync & completer)
void UpdateBlockSize (::fuchsia_hardware_sdio::wire::DeviceUpdateBlockSizeRequest * request, fdf::Arena & arena, UpdateBlockSizeCompleter::Sync & completer)
void GetBlockSize (fdf::Arena & arena, GetBlockSizeCompleter::Sync & completer)
void ReadByte (::fuchsia_hardware_sdio::wire::DeviceReadByteRequest * request, fdf::Arena & arena, ReadByteCompleter::Sync & completer)
Reads a byte from a register. If `suppress_error_messages` is true, the SDMMC stack will not
log error-severity messages.
void WireServer ()
Defined at line 4300 of file fidling/gen/sdk/fidl/fuchsia.hardware.sdio/fuchsia.hardware.sdio/cpp/fidl/fuchsia.hardware.sdio/cpp/driver/wire_messaging.h
void WriteByte (::fuchsia_hardware_sdio::wire::DeviceWriteByteRequest * request, fdf::Arena & arena, WriteByteCompleter::Sync & completer)
Writes a byte to a register. If `read_after_write` is true, the register is read after
writing and the value is returned, otherwise the original value is returned. If
`suppress_error_messages` is true, the write is expected to fail, and the SDMMC stack will
not log error-severity messages.
void GetInBandIntr (fdf::Arena & arena, GetInBandIntrCompleter::Sync & completer)
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.
void AckInBandIntr (fdf::Arena & arena, AckInBandIntrCompleter::Sync & completer)
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.
void IoAbort (fdf::Arena & arena, IoAbortCompleter::Sync & completer)
The following functions access the card common control registers (CCCR) on function 0.
Aborts an I/O operation occurring on the specified function.
void IntrPending (fdf::Arena & arena, IntrPendingCompleter::Sync & completer)
Returns true if an interrupt is pending for function fn_idx, false otherwise.
void DoVendorControlRwByte (::fuchsia_hardware_sdio::wire::DeviceDoVendorControlRwByteRequest * request, fdf::Arena & arena, DoVendorControlRwByteCompleter::Sync & completer)
Reads or writes to a vendor CCCR register. addr must be in [0xF0, 0xFF].
void RegisterVmo (::fuchsia_hardware_sdio::wire::DeviceRegisterVmoRequest * request, fdf::Arena & arena, RegisterVmoCompleter::Sync & completer)
void UnregisterVmo (::fuchsia_hardware_sdio::wire::DeviceUnregisterVmoRequest * request, fdf::Arena & arena, UnregisterVmoCompleter::Sync & completer)
void DoRwTxn (::fuchsia_hardware_sdio::wire::DeviceDoRwTxnRequest * request, fdf::Arena & arena, DoRwTxnCompleter::Sync & completer)
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.
void RequestCardReset (fdf::Arena & arena, RequestCardResetCompleter::Sync & completer)
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.
void PerformTuning (fdf::Arena & arena, PerformTuningCompleter::Sync & completer)
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)).
Handler bind_handler (fdf_dispatcher_t * dispatcher)
|bind_handler| returns a handler that binds incoming connections to this
server implementation.
The returned handler borrows the server instance.
The server must outlive the provided |dispatcher|. Only after
the dispatcher is shutdown will it be safe to destroy the servers.
The server should not be moved.
void ~WireServer ()
Defined at line 4301 of file fidling/gen/sdk/fidl/fuchsia.hardware.sdio/fuchsia.hardware.sdio/cpp/fidl/fuchsia.hardware.sdio/cpp/driver/wire_messaging.h