PROTOCOLS
Device
Defined in fuchsia.hardware.i2cimpl/i2cimpl.fidl
Low-level protocol for i2c drivers.
GetMaxTransferSize
Request
<EMPTY>
Response
Name | Type |
---|---|
payload | Device_GetMaxTransferSize_Result |
SetBitrate
Sets the bitrate for the i2c bus in KHz units.
Request
Name | Type |
---|---|
bitrate | uint32 |
Response
Name | Type |
---|---|
payload | Device_SetBitrate_Result |
Transact
|Transact| assumes that write ops write_data length are not zero. |Transact| assumes that at least the last op has stop set to true.
For each read-transaction, there will be a corresponding ReadData returned. Write-transactions produce no data result.
Request
Name | Type |
---|---|
op | vector<I2cImplOp>:256 |
Response
Name | Type |
---|---|
payload | Device_Transact_Result |
STRUCTS
Device_GetMaxTransferSize_Response
Defined in fuchsia.hardware.i2cimpl/i2cimpl.fidl
Field | Type | Description | Default |
---|---|---|---|
size | uint64 | No default |
Device_SetBitrate_Response
Defined in fuchsia.hardware.i2cimpl/i2cimpl.fidl
<EMPTY>
Device_Transact_Response
Defined in fuchsia.hardware.i2cimpl/i2cimpl.fidl
Field | Type | Description | Default |
---|---|---|---|
read | vector<ReadData>:256 | No default |
I2cImplOp
Defined in fuchsia.hardware.i2cimpl/i2cimpl.fidl
See Transact
below for usage.
Field | Type | Description | Default |
---|---|---|---|
address | uint16 | No default | |
type | I2cImplOpType | No default | |
stop | bool | No default |
ReadData
Defined in fuchsia.hardware.i2cimpl/i2cimpl.fidl
The result of one read transaction.
Field | Type | Description | Default |
---|---|---|---|
data | vector<uint8>:32768 | No default |
UNIONS
Device_GetMaxTransferSize_Result strict
Defined in fuchsia.hardware.i2cimpl/i2cimpl.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 | response | Device_GetMaxTransferSize_Response | |
2 | err | zx/Status | |
3 | framework_err | internal |
Device_SetBitrate_Result strict
Defined in fuchsia.hardware.i2cimpl/i2cimpl.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 | response | Device_SetBitrate_Response | |
2 | err | zx/Status | |
3 | framework_err | internal |
Device_Transact_Result strict
Defined in fuchsia.hardware.i2cimpl/i2cimpl.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 | response | Device_Transact_Response | |
2 | err | zx/Status | |
3 | framework_err | internal |
I2cImplOpType strict
Defined in fuchsia.hardware.i2cimpl/i2cimpl.fidl
If read_size
is set: This is a read operation and read_size
bytes will be read. If write_data
is set: This is a write operation and write_data
will be written.
Ordinal | Variant | Type | Description |
---|---|---|---|
1 | read_size | uint32 | |
2 | write_data | vector<uint8>:32768 |
SERVICES
Service
Defined in fuchsia.hardware.i2cimpl/i2cimpl.fidl
Name | Type | Transport |
---|---|---|
device | fuchsia.hardware.i2cimpl/Device | Driver |