Google is committed to advancing racial equity for Black communities. See how.

fuchsia.hardware.spiimpl

PROTOCOLS

SpiImpl

Defined in fuchsia.hardware.spiimpl/spi-impl.banjo

Low-level protocol for spi drivers.

Exchange

Perform a SPI bus transaction of the specified length. Either txdata or rxdata may be NULL, in which case the transaction will be half-duplex in the appropriate direction. Regardless, both vectors must have the same length.

Request

NameType
chip_select uint32
txdata vector<uint8>

Response

NameType
status zx/status
rxdata vector<uint8>

ExchangeVmo

Request

NameType
chip_select uint32
tx_vmo_id uint32
tx_offset uint64
rx_vmo_id uint32
rx_offset uint64
size uint64

Response

NameType
status zx/status

GetChipSelectCount

Returns the number of chip select lines available or provided by the driver instance. To be used as a limit on the acceptable values for the `chip_select' field in the Exchange() and ExchangeVmo() methods.

Request

NameType

Response

NameType
count uint32

ReceiveVmo

Request

NameType
chip_select uint32
vmo_id uint32
offset uint64
size uint64

Response

NameType
status zx/status

RegisterVmo

rights is a bit field containing SpiVmoRight values, and determines the read/write permissions used by the implementation when pinning or mapping the VMO.

Request

NameType
chip_select uint32
vmo_id uint32
vmo handle<vmo>
offset uint64
size uint64
rights uint32

Response

NameType
status zx/status

TransmitVmo

Request

NameType
chip_select uint32
vmo_id uint32
offset uint64
size uint64

Response

NameType
status zx/status

UnregisterVmo

Request

NameType
chip_select uint32
vmo_id uint32

Response

NameType
status zx/status
vmo handle<vmo>

STRUCTS

ENUMS

SpiVmoRight

Type: uint32

Defined in fuchsia.hardware.spiimpl/spi-impl.banjo

NameValueDescription
READ 1
WRITE 2