fuchsia.hardware.serialimpl

Added: HEAD

PROTOCOLS

Device

Defined in fuchsia.hardware.serialimpl/serial-impl.fidl

CancelAll

Immediately cancels all outstanding asynchronous I/O

Request

<EMPTY>

Response

NameType
payload Device_CancelAll_Result

Config

Configures the given serial port. Values of flags are defined in the constants above.

Request

NameType
baud_rate uint32
flags uint32

Response

NameType
payload Device_Config_Result

Enable

Enable or disable the device. If already enabled and enable is true, this is a no-op and returns successfully. If already disabled and enable is false, this is a no-op and returns successfully.

  • request enable true to enable the device, or false to disable it.
  • error one of the following values:
  • `ZX_ERR_BAD_STATE`: `enable` was false, and a `Read()` or `Write()` call was pending.
    

Request

NameType
enable bool

Response

NameType
payload Device_Enable_Result

GetInfo

Request

<EMPTY>

Response

NameType
payload Device_GetInfo_Result

Read

Perform a read operation. Returns immediately if data has been received since the last call; otherwise the request is completed the next time data is received (clients can use the hanging-get pattern to be notified of new data).

  • response data the bytes read from the device.
  • error one of the following values:
  • `ZX_ERR_BAD_STATE`: The device was not enabled.
    
  • `ZX_ERR_CANCELED`: The call was canceled by `CancelAll()`.
    
  • `ZX_ERR_ALREADY_BOUND`: Another `Read()` call was already pending.
    
  • Other values may be returned for driver- or device-specific errors.
    

Request

<EMPTY>

Response

NameType
payload Device_Read_Result

Write

Perform a write operation. Returns when all bytes have been written, or when an error is encountered.

  • request data the bytes to write to the device.
  • error one of the following values:
  • `ZX_ERR_BAD_STATE`: The device was not enabled.
    
  • `ZX_ERR_CANCELED`: The call was canceled by `CancelAll()`.
    
  • `ZX_ERR_ALREADY_BOUND`: Another `Write()` call was already pending.
    
  • Other values may be returned for driver- or device-specific errors.
    

Request

NameType
data vector<uint8>

Response

NameType
payload Device_Write_Result

STRUCTS

Device_CancelAll_Response

Defined in fuchsia.hardware.serialimpl/serial-impl.fidl

<EMPTY>

Device_Config_Response

Defined in fuchsia.hardware.serialimpl/serial-impl.fidl

<EMPTY>

Device_Enable_Response

Defined in fuchsia.hardware.serialimpl/serial-impl.fidl

<EMPTY>

Device_GetInfo_Response

Defined in fuchsia.hardware.serialimpl/serial-impl.fidl

FieldTypeDescriptionDefault
info fuchsia.hardware.serial/SerialPortInfo No default

Device_Read_Response

Defined in fuchsia.hardware.serialimpl/serial-impl.fidl

FieldTypeDescriptionDefault
data vector<uint8> No default

Device_Write_Response

Defined in fuchsia.hardware.serialimpl/serial-impl.fidl

<EMPTY>

UNIONS

Device_CancelAll_Result strict

Defined in fuchsia.hardware.serialimpl/serial-impl.fidl

OrdinalVariantTypeDescription
response Device_CancelAll_Response
framework_err internal

Device_Config_Result strict

Defined in fuchsia.hardware.serialimpl/serial-impl.fidl

OrdinalVariantTypeDescription
response Device_Config_Response
err zx/Status
framework_err internal

Device_Enable_Result strict

Defined in fuchsia.hardware.serialimpl/serial-impl.fidl

OrdinalVariantTypeDescription
response Device_Enable_Response
err zx/Status
framework_err internal

Device_GetInfo_Result strict

Defined in fuchsia.hardware.serialimpl/serial-impl.fidl

OrdinalVariantTypeDescription
response Device_GetInfo_Response
err zx/Status
framework_err internal

Device_Read_Result strict

Defined in fuchsia.hardware.serialimpl/serial-impl.fidl

OrdinalVariantTypeDescription
response Device_Read_Response
err zx/Status
framework_err internal

Device_Write_Result strict

Defined in fuchsia.hardware.serialimpl/serial-impl.fidl

OrdinalVariantTypeDescription
response Device_Write_Response
err zx/Status
framework_err internal

CONSTANTS

NameValueTypeDescription
SERIAL_DATA_BITS_5 0 uint32
SERIAL_DATA_BITS_6 1 uint32
SERIAL_DATA_BITS_7 2 uint32
SERIAL_DATA_BITS_8 3 uint32
SERIAL_DATA_BITS_MASK 3 uint32
SERIAL_FLOW_CTRL_CTS_RTS 32 uint32
SERIAL_FLOW_CTRL_MASK 32 uint32
SERIAL_FLOW_CTRL_NONE 0 uint32
SERIAL_PARITY_EVEN 8 uint32
SERIAL_PARITY_MASK 24 uint32
SERIAL_PARITY_NONE 0 uint32
SERIAL_PARITY_ODD 16 uint32
SERIAL_SET_BAUD_RATE_ONLY 2147483648 uint32
SERIAL_STOP_BITS_1 0 uint32
SERIAL_STOP_BITS_2 4 uint32
SERIAL_STOP_BITS_MASK 4 uint32

SERVICES

Service

Defined in fuchsia.hardware.serialimpl/serial-impl.fidl

NameTypeTransport
device fuchsia.hardware.serialimpl/Device Driver