协议
调试
在 fuchsia.hardware.power.usb/usb.fidl 中定义
用于测试和调试 USB Type-C 端口(例如 cable-breaker)控制的协议。
SetConnected
连接或断开物理 Type-C CC 线路和 USB 数据开关。
当 connected 为 false 时,停用自主 DRP 切换并打开 CC1/CC2 终端,以模拟物理线缆拔出。当 connected 为 true 时,恢复自主 DRP Rp/Rd 切换并重启连接检测;如果提供了 wake_lease,驱动程序会在 CC 连接去抖动和 BC1.2 检测期间保持该状态,以便系统在 USB 重新枚举之前不会重新挂起。
请求
| 名称 | 类型 |
|---|---|
connected |
bool
|
wake_lease |
fuchsia.power.system/LeaseToken
|
响应
| 名称 | 类型 |
|---|---|
payload |
Debug_SetConnected_Result
|
UsbSource
在 fuchsia.hardware.power.usb/usb.fidl 中定义
GetSpec
立即返回 USB 音源的静态硬件特性。
请求
<EMPTY>
响应
| 名称 | 类型 |
|---|---|
payload |
UsbSource_GetSpec_Result
|
GetStatus
立即返回 USB 音源的动态状态。
请求
<EMPTY>
响应
| 名称 | 类型 |
|---|---|
payload |
UsbSource_GetStatus_Result
|
SetInputCurrentLimit
设置此 USB 输入的电流上限。
请求
| 名称 | 类型 |
|---|---|
limit_ua |
uint32
|
响应
| 名称 | 类型 |
|---|---|
payload |
UsbSource_SetInputCurrentLimit_Result
|
观看
挂起获取状态更新。 如需了解语义,请参阅 fuchsia.hardware.power.source/Source.Watch。
错误
- 如果在上一次调用完成之前调用
Watch,则会返回ALREADY_BOUND。
请求
| 名称 | 类型 |
|---|---|
interest |
Status
|
wake_on |
Status
|
lease |
fuchsia.power.system/LeaseToken
|
响应
| 名称 | 类型 |
|---|---|
payload |
UsbSource_Watch_Result
|
STRUCTS
Debug_SetConnected_Response
在 fuchsia.hardware.power.usb/usb.fidl 中定义
<EMPTY>
UsbSource_GetSpec_Response
在 fuchsia.hardware.power.usb/usb.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
spec |
Spec
|
无默认应用 |
UsbSource_GetStatus_Response
在 fuchsia.hardware.power.usb/usb.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
status |
Status
|
无默认应用 |
UsbSource_SetInputCurrentLimit_Response
在 fuchsia.hardware.power.usb/usb.fidl 中定义
<EMPTY>
UsbSource_Watch_Response 资源
在 fuchsia.hardware.power.usb/usb.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
status |
Status
|
无默认应用 | |
wake_lease |
fuchsia.power.system/LeaseToken
|
无默认应用 |
TABLES
规格
在 fuchsia.hardware.power.usb/usb.fidl 中定义
USB 音源的静态硬件特性。
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
source_spec |
fuchsia.hardware.power.source/Spec
|
底层电源的基本规格。 |
状态
在 fuchsia.hardware.power.usb/usb.fidl 中定义
USB 来源的动态状态。
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
source_status |
fuchsia.hardware.power.source/Status
|
底层电源的基本状态。 |
2 |
input_current_limit_ua |
uint32
|
当前稳定的输入电流限制,以微安为单位。 |
UNIONS
Debug_SetConnected_Result strict
在 fuchsia.hardware.power.usb/usb.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Debug_SetConnected_Response
|
|
2 |
err |
fuchsia.hardware.power.source/Error
|
|
3 |
framework_err |
internal
|
UsbSource_GetSpec_Result strict
在 fuchsia.hardware.power.usb/usb.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
UsbSource_GetSpec_Response
|
|
2 |
err |
fuchsia.hardware.power.source/Error
|
|
3 |
framework_err |
internal
|
UsbSource_GetStatus_Result strict
在 fuchsia.hardware.power.usb/usb.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
UsbSource_GetStatus_Response
|
|
2 |
err |
fuchsia.hardware.power.source/Error
|
|
3 |
framework_err |
internal
|
UsbSource_SetInputCurrentLimit_Result strict
在 fuchsia.hardware.power.usb/usb.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
UsbSource_SetInputCurrentLimit_Response
|
|
2 |
err |
fuchsia.hardware.power.source/Error
|
|
3 |
framework_err |
internal
|
UsbSource_Watch_Result strict resource
在 fuchsia.hardware.power.usb/usb.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
UsbSource_Watch_Response
|
|
2 |
err |
fuchsia.hardware.power.source/Error
|
|
3 |
framework_err |
internal
|
服务
DebugService
在 fuchsia.hardware.power.usb/usb.fidl 中定义
| 名称 | 类型 | 传输 |
|---|---|---|
| debug |
fuchsia.hardware.power.usb/Debug
|
渠道 |
服务
在 fuchsia.hardware.power.usb/usb.fidl 中定义
| 名称 | 类型 | 传输 |
|---|---|---|
| usb |
fuchsia.hardware.power.usb/UsbSource
|
渠道 |
| power_source |
fuchsia.hardware.power.source/Source
|
渠道 |