fuchsia.hardware.google.nanohub

The fuchsia.hardware.google.nanohub library defines the display protocol for interacting with a display driver connected to a microcontroller unit (MCU). This interface targets a specific piece of hardware, and may be revised in the future, and aims to be an exact translation of an existing API.

This protocol provides methods to:

  • Query the current operational mode and state of the display.
  • Retrieve synchronization information, including brightness levels for different modes.
  • Select the active display from a predefined set of options.
Added: HEAD

PROTOCOLS

DataChannel

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

DataChannel Implementation

GetIdentifier

Returns the identifier associated with this connection.

Request

<EMPTY>

Response

NameType
payload DataChannel_GetIdentifier_Result

Read

The call will return the next datagram to be read from the channel. If there is more data to be read, SIGNAL_READABLE will remain asserted after this call returns.

Request

NameType
payload DataChannelReadRequest

Response

NameType
payload DataChannel_Read_Result

Register

Set event used to signal device state. Discards existing event after having transferred device state to the new event. This must be called before invoking Read or Write, and can fail with ZX_ERR_NO_RESOURCES if the underlying channel is busy.

Request

NameType
event handle<event>

Response

NameType
payload DataChannel_Register_Result

Write

The call will return once the data is fully committed.

If the driver is not ready for a write, it will return ZX_ERR_NO_RESOURCES and the caller should await SIGNAL_WRITABLE to be asserted.

Request

NameType
payload DataChannelWriteRequest

Response

NameType
payload DataChannel_Write_Result

Device

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

Client is expected to pass the vmo handle to nanohub when issuing a DownloadFirmware request.

DownloadFirmware

Request to sent to nanohub to load the firmware.

Request

NameType
firmware handle<vmo>
offset uint64

Response

NameType
payload Device_DownloadFirmware_Result

GetFirmwareName

The name of the firmware binary running on the MCU.

Request

<EMPTY>

Response

NameType
firmware_name FirmwareName

GetFirmwareVersion

The version of the firmware binary running on the MCU.

Request

<EMPTY>

Response

NameType
version_info McuVersionInfo

GetTimeSync

The time since boot recorded by the AP and the MCU.

Request

<EMPTY>

Response

NameType
payload Device_GetTimeSync_Result

GetWakeUpEventDuration

Get the current duration of time the MCU will remain awake.

Request

<EMPTY>

Response

NameType
payload Device_GetWakeUpEventDuration_Result

HardwareReset

Initiates a hardware reset.

Request

NameType
isp_pin_0 PinState
isp_pin_1 PinState
isp_pin_2 PinState

Response

NameType
payload Device_HardwareReset_Result

SetWakeLock

Set an MCU wake lock request to prevent the MCU from entering a low-power state.

Request

NameType
value McuWakeLockValue

Response

NameType
payload Device_SetWakeLock_Result

SetWakeUpEventDuration

Set a duration of time for the MCU to remain awake.

Request

NameType
duration zx/Duration

Response

NameType
payload Device_SetWakeUpEventDuration_Result

DisplayDevice

Defined in fuchsia.hardware.google.nanohub/nanohubdisplay.fidl

Protocol for interacting with the Google-specific display hardware.

GetDisplayInfo

Gets synchronization information for the display. This can include the display's mode, panel mode, and brightness levels.

Request

<EMPTY>

Response

NameType
payload DisplayDevice_GetDisplayInfo_Result

GetDisplaySelect

Gets the current display owner, which is either the AP (Application Processor) or the MCU (Microcontroller Unit).

Request

<EMPTY>

Response

NameType
payload DisplayDevice_GetDisplaySelect_Result

GetDisplayState

Gets the current state of the display.

Request

<EMPTY>

Response

NameType
payload DisplayDevice_GetDisplayState_Result

SetDisplaySelect

Sets the display owner to be either the AP (Application Processor) or the MCU (Microcontroller Unit).

Request

NameType
payload DisplayDeviceSetDisplaySelectRequest

Response

NameType
payload DisplayDevice_SetDisplaySelect_Result

HangingDataChannel

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

Provides a bound / connected session to a particular DataChannel. New connections should use the UnboundHangingDataChannel to open a session of this procotol. Calls to Read() on a HangingDataChannel will operate as a Hanging-Get, only returning once data becomes available.

Read

The call will return the next datagram to be read from the channel. This call has hanging get semantics and will return once data is available.

Request

<EMPTY>

Response

NameType
payload HangingDataChannel_Read_Result

Write

The call will return once the data is fully committed.

If the driver is not ready for a write, it will return ZX_ERR_NO_RESOURCES

Request

NameType
payload HangingDataChannelWriteRequest

Response

NameType
payload HangingDataChannel_Write_Result

LifecycleObserver

Defined in fuchsia.hardware.google.nanohub/lifecycle.fidl

Observer interface for lifecycle events.

OnLifecycleChange

Called when the lifecycle state changes.

Response

NameType
event LifecycleEvent

UnboundHangingDataChannel

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

Bind

Returns a bound client Will return ZX_ERR_ALREADY_BOUND if no instances are available

Request

NameType
payload UnboundHangingDataChannelBindRequest

Response

NameType
payload UnboundHangingDataChannel_Bind_Result

GetIdentifier

Returns the identifier associated with this connection.

Request

<EMPTY>

Response

NameType
payload UnboundHangingDataChannel_GetIdentifier_Result

UnboundWaitableDataChannel

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

Provides both service instance disambiguation as well as a notion of a disconnected data channel via bind interface. Callers should use this protocol to acquire a bound WaitableDataChannel.

Bind

Set event used to signal device state, using the signals above, and returns a bound client. Will return ZX_ERR_ALREADY_BOUND if no instances are available.

Request

NameType
payload UnboundWaitableDataChannelBindRequest

Response

NameType
payload UnboundWaitableDataChannel_Bind_Result

GetIdentifier

Returns the identifier associated with this connection.

Request

<EMPTY>

Response

NameType
payload UnboundWaitableDataChannel_GetIdentifier_Result

WaitableDataChannel

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

Provides a bound / connected session to a particular DataChannel. New connections should use the UnboundWaitableDataChannel to open a session of this procotol. Calls to Read() on a WaitableDataChannel will operate as a non-blocking operation. Callers will need to use the event exchanged in the Bind() call to flag when data is available to read

Read

The call will return the next datagram to be read from the channel. If there is more data to be read, SIGNAL_READABLE will remain asserted after this call returns. If there is no data to be read, this call will return ZX_ERR_SHOULD_WAIT

Request

<EMPTY>

Response

NameType
payload WaitableDataChannel_Read_Result

Write

The call will return once the data is fully committed.

If the driver is not ready for a write, it will return ZX_ERR_NO_RESOURCES and the caller should await SIGNAL_WRITABLE to be asserted.

Request

NameType
payload WaitableDataChannelWriteRequest

Response

NameType
payload WaitableDataChannel_Write_Result

STRUCTS

DataChannel_Register_Response

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

<EMPTY>

DataChannel_Write_Response

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

<EMPTY>

Device_DownloadFirmware_Response

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

<EMPTY>

Device_GetWakeUpEventDuration_Response

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

FieldTypeDescriptionDefault
duration zx/Duration No default

Device_HardwareReset_Response

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

<EMPTY>

Device_SetWakeLock_Response

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

<EMPTY>

Device_SetWakeUpEventDuration_Response

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

<EMPTY>

DisplayDevice_SetDisplaySelect_Response

Defined in fuchsia.hardware.google.nanohub/nanohubdisplay.fidl

<EMPTY>

HangingDataChannel_Write_Response

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

<EMPTY>

HardwareResetPinStates

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

FieldTypeDescriptionDefault
isp_pin_0 PinState No default
isp_pin_1 PinState No default
isp_pin_2 PinState No default

McuVersionInfo

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

FieldTypeDescriptionDefault
hardware_type uint16 No default
hardware_version uint16 No default
bootloader_version uint16 No default
os_version uint16 No default
variant_version uint32 No default

UnboundHangingDataChannel_Bind_Response

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

<EMPTY>

UnboundWaitableDataChannel_Bind_Response

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

<EMPTY>

WaitableDataChannel_Write_Response

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

<EMPTY>

ENUMS

DisplayMode flexible

Type: uint8

Defined in fuchsia.hardware.google.nanohub/nanohubdisplay.fidl

Represents the various modes the MCU display can be in.

NameValueDescription
0

The display is not in a known state.

1

The MCU stack is driving the display initializing.

2

The display is off.

3

The display is in an idle, low-power state.

4

The display is on.

5

The display is in a high-brightness mode.

DisplaySelect flexible

Type: int64

Defined in fuchsia.hardware.google.nanohub/nanohubdisplay.fidl

Selects which processor has ownership of the display.

NameValueDescription
0

The MCU (Microcontroller Unit) has control of the display.

1

The AP (Application Processor) has control of the display.

LifecycleEvent flexible

Type: uint32

Defined in fuchsia.hardware.google.nanohub/lifecycle.fidl

Events related to the lifecycle of the MCU.

NameValueDescription
0

Indicates the MCU is not currently configured.

1

Indicates the MCU is starting up.

2

Indicates the MCU is ready to accept commands and data.

3

Indicates the MCU is shutting down.

McuWakeLockValue strict

Type: uint8

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

NameValueDescription
0
1

PinState strict

Type: uint32

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

NameValueDescription
0
1

TABLES

DataChannelReadRequest

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalFieldTypeDescription
blocking bool

If specified and set to false, then the call will return immediately if there is no data to read with ZX_ERR_SHOULD_WAIT. Otherwise the call has hanging get semantics and will return once data is available.

DataChannelWriteRequest

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalFieldTypeDescription
data vector<uint8>:255

DataChannel_GetIdentifier_Response

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalFieldTypeDescription
name string:100

DataChannel_Read_Response resource

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalFieldTypeDescription
data vector<uint8>:255
wake_lease handle<eventpair>

DisplayDeviceSetDisplaySelectRequest

Defined in fuchsia.hardware.google.nanohub/nanohubdisplay.fidl

OrdinalFieldTypeDescription
display_select DisplaySelect

DisplayDevice_GetDisplaySelect_Response

Defined in fuchsia.hardware.google.nanohub/nanohubdisplay.fidl

OrdinalFieldTypeDescription
display_select DisplaySelect

DisplayState

Defined in fuchsia.hardware.google.nanohub/nanohubdisplay.fidl

Represents the current state of the MCU display.

OrdinalFieldTypeDescription
mode DisplayMode

The current mode of the display.

DisplaySyncInfo

Defined in fuchsia.hardware.google.nanohub/nanohubdisplay.fidl

Contains synchronization information for the MCU display.

OrdinalFieldTypeDescription
display_mode DisplayMode

The current mode of the display.

panel_mode uint8

The current panel mode.

normal_brightness uint16

The normal brightness mode brightness level.

always_on_display_brightness uint16

The always-on-display brightness level.

HangingDataChannelWriteRequest

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalFieldTypeDescription
data vector<uint8>:255

HangingDataChannel_Read_Response resource

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalFieldTypeDescription
data vector<uint8>:255
wake_lease handle<eventpair>

McuTimeSyncInfo

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

OrdinalFieldTypeDescription
ap_boot_time zx/Time
mcu_boot_time zx/Time

UnboundHangingDataChannelBindRequest resource

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalFieldTypeDescription
server server_end:HangingDataChannel

UnboundHangingDataChannel_GetIdentifier_Response

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalFieldTypeDescription
name string:100

UnboundWaitableDataChannelBindRequest resource

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalFieldTypeDescription
event handle<event>
server server_end:WaitableDataChannel

UnboundWaitableDataChannel_GetIdentifier_Response

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalFieldTypeDescription
name string:100

WaitableDataChannelWriteRequest

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalFieldTypeDescription
data vector<uint8>:255

WaitableDataChannel_Read_Response resource

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalFieldTypeDescription
data vector<uint8>:255

UNIONS

DataChannel_GetIdentifier_Result strict

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalVariantTypeDescription
response DataChannel_GetIdentifier_Response
framework_err internal

DataChannel_Read_Result strict resource

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalVariantTypeDescription
response DataChannel_Read_Response
err zx/Status
framework_err internal

DataChannel_Register_Result strict

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalVariantTypeDescription
response DataChannel_Register_Response
err zx/Status
framework_err internal

DataChannel_Write_Result strict

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalVariantTypeDescription
response DataChannel_Write_Response
err zx/Status
framework_err internal

Device_DownloadFirmware_Result strict

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

OrdinalVariantTypeDescription
response Device_DownloadFirmware_Response
err zx/Status

Device_GetTimeSync_Result strict

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

OrdinalVariantTypeDescription
response McuTimeSyncInfo
err zx/Status

Device_GetWakeUpEventDuration_Result strict

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

OrdinalVariantTypeDescription
response Device_GetWakeUpEventDuration_Response
err zx/Status

Device_HardwareReset_Result strict

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

OrdinalVariantTypeDescription
response Device_HardwareReset_Response
err zx/Status

Device_SetWakeLock_Result strict

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

OrdinalVariantTypeDescription
response Device_SetWakeLock_Response
err zx/Status

Device_SetWakeUpEventDuration_Result strict

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

OrdinalVariantTypeDescription
response Device_SetWakeUpEventDuration_Response
err zx/Status

DisplayDevice_GetDisplayInfo_Result strict

Defined in fuchsia.hardware.google.nanohub/nanohubdisplay.fidl

OrdinalVariantTypeDescription
response DisplaySyncInfo
err zx/Status

DisplayDevice_GetDisplaySelect_Result strict

Defined in fuchsia.hardware.google.nanohub/nanohubdisplay.fidl

OrdinalVariantTypeDescription
response DisplayDevice_GetDisplaySelect_Response
err zx/Status

DisplayDevice_GetDisplayState_Result strict

Defined in fuchsia.hardware.google.nanohub/nanohubdisplay.fidl

OrdinalVariantTypeDescription
response DisplayState
err zx/Status

DisplayDevice_SetDisplaySelect_Result strict

Defined in fuchsia.hardware.google.nanohub/nanohubdisplay.fidl

OrdinalVariantTypeDescription
response DisplayDevice_SetDisplaySelect_Response
err zx/Status

HangingDataChannel_Read_Result strict resource

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalVariantTypeDescription
response HangingDataChannel_Read_Response
err zx/Status
framework_err internal

HangingDataChannel_Write_Result strict

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalVariantTypeDescription
response HangingDataChannel_Write_Response
err zx/Status
framework_err internal

UnboundHangingDataChannel_Bind_Result strict

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalVariantTypeDescription
response UnboundHangingDataChannel_Bind_Response
err zx/Status
framework_err internal

UnboundHangingDataChannel_GetIdentifier_Result strict

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalVariantTypeDescription
response UnboundHangingDataChannel_GetIdentifier_Response
framework_err internal

UnboundWaitableDataChannel_Bind_Result strict

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalVariantTypeDescription
response UnboundWaitableDataChannel_Bind_Response
err zx/Status
framework_err internal

UnboundWaitableDataChannel_GetIdentifier_Result strict

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalVariantTypeDescription
response UnboundWaitableDataChannel_GetIdentifier_Response
framework_err internal

WaitableDataChannel_Read_Result strict resource

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalVariantTypeDescription
response WaitableDataChannel_Read_Response
err zx/Status
framework_err internal

WaitableDataChannel_Write_Result strict

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

OrdinalVariantTypeDescription
response WaitableDataChannel_Write_Response
err zx/Status
framework_err internal

CONSTANTS

NameValueTypeDescription
MAX_ID_NAME_SIZE 100 uint32
MAX_MESSAGE_SIZE 255 uint32

Maximum sized message that is supported

SIGNAL_READABLE 16777216 uint32

Signal that will be active on event handle if the Read() method will return data.

SIGNAL_WAKELOCK 67108864 uint32

Signal that will be asserted when SIGNAL_READABLE is set and remains asserted until a driver-defined timeout passes after the call to Read This is primarily intended for integration with Starnix

SIGNAL_WRITABLE 33554432 uint32

Signal that will be active on event handle if the Write() method will accept data.

ALIASES

NameValueDescription
FirmwareName string[64]

SERVICES

DataChannelService

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

NameTypeTransport
device fuchsia.hardware.google.nanohub/DataChannel Channel
lifecycle fuchsia.hardware.google.nanohub/LifecycleObserver Channel

DisplayService

Defined in fuchsia.hardware.google.nanohub/nanohubdisplay.fidl

NameTypeTransport
mcudisplay fuchsia.hardware.google.nanohub/DisplayDevice Channel

DriverDataChannelService

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

NameTypeTransport
hanging fuchsia.hardware.google.nanohub/UnboundHangingDataChannel Channel
waitable fuchsia.hardware.google.nanohub/UnboundWaitableDataChannel Channel
lifecycle fuchsia.hardware.google.nanohub/LifecycleObserver Channel

Service

Defined in fuchsia.hardware.google.nanohub/nanohub.fidl

NameTypeTransport
nanohub fuchsia.hardware.google.nanohub/Device Channel

StarnixDataChannelService

Defined in fuchsia.hardware.google.nanohub/datachannel.fidl

NameTypeTransport
hanging fuchsia.hardware.google.nanohub/UnboundHangingDataChannel Channel
waitable fuchsia.hardware.google.nanohub/UnboundWaitableDataChannel Channel
lifecycle fuchsia.hardware.google.nanohub/LifecycleObserver Channel