openharmony 鸿蒙 capi-usb-ddk-types-h

2026-08-25 浏览 (1)

usb_ddk_types.h

Overview

Provides the enumerated variables, structures, and macros used in USB DDK APIs.

File to include: <usb/usb_ddk_types.h>

Library: libusb_ndk.z.so

System capability: SystemCapability.Driver.USB.Extension

Since: 10

Related module: UsbDdk

Summary

Structs

Nametypedef KeywordDescription
UsbControlRequestSetup__attribute__((aligned(8))) UsbControlRequestSetupSetup data for control transfer. It corresponds to Setup Data in the USB protocol.
UsbDeviceDescriptor__attribute__((aligned(8))) UsbDeviceDescriptorDefines standard device descriptors, which correspond to Standard Device Descriptor in the USB protocol.
UsbConfigDescriptor__attribute__((packed)) UsbConfigDescriptorDefines standard configuration descriptors, which correspond to Standard Configuration Descriptor in the USB protocol.
UsbInterfaceDescriptor__attribute__((packed)) UsbInterfaceDescriptorDefines standard interface descriptors, which correspond to Standard Interface Descriptor in the USB protocol.
UsbEndpointDescriptor__attribute__((packed)) UsbEndpointDescriptorDefines standard endpoint descriptors, which correspond to Standard Endpoint Descriptor in the USB protocol.
UsbDdkEndpointDescriptorUsbDdkEndpointDescriptorDefines endpoint descriptors.
UsbDdkInterfaceDescriptorUsbDdkInterfaceDescriptorDefines USB interface descriptors.
UsbDdkInterfaceUsbDdkInterfaceDefines a USB DDK API, which is a collection of alternate settings for a particular USB interface.
UsbDdkConfigDescriptorUsbDdkConfigDescriptorDefines configuration descriptors.
UsbRequestPipe__attribute__((aligned(8))) UsbRequestPipeDefines a USB request pipe.
UsbDeviceMemMapUsbDeviceMemMapDevice memory map created by calling OH_Usb_CreateDeviceMemMap. A buffer using the device memory map can provide better performance.
Usb_DeviceArrayUsb_DeviceArrayDefines the device ID list, which is used to store the device IDs and device quantity obtained using OH_Usb_GetDevices.
Usb_NonRootHubArrayUsb_NonRootHubArrayDefines the non-root hub list, which is used to store the non-root hub IDs and quantity obtained using OH_Usb_GetNonRootHubs.

Enums

Nametypedef KeywordDescription
UsbDdkErrCodeUsbDdkErrCodeEnumerates the USB DDK error code definitions.

Enum Description

UsbDdkErrCode

enum UsbDdkErrCode

Description

Enumerates the USB DDK error code definitions.

Since: 10

EnumDescription
USB_DDK_SUCCESS = 0Operation succeeded.
USB_DDK_FAILED = -1Operation failed.
Deprecated from: 16
USB_DDK_NO_PERM = 201No permission.
Since: 14
USB_DDK_INVALID_PARAMETER = 401Invalid parameter. The value is -2 before API version 16.
USB_DDK_MEMORY_ERROR = 27400001Memory errors, such as insufficient memory, memory data copy failure, or memory allocation failure. The value is -3 before API version 16.
USB_DDK_INVALID_OPERATION = 27400002Invalid operation. The value is -4 before API version 16.
USB_DDK_NULL_PTR = -5Null pointer.
Deprecated from: 16
USB_DDK_DEVICE_BUSY = -6Device busy.
Deprecated from: 16
USB_DDK_IO_FAILED = 27400003Device I/O operation failure.
Since: 14
USB_DDK_TIMEOUT = 27400004Transmission timeout. The value is -7 before API version 16.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 capi-scsiperipheralddk-scsiperipheral-request

openharmony 鸿蒙 capi-usbddk-usbconfigdescriptor

openharmony 鸿蒙 capi-hidddk

openharmony 鸿蒙 capi-usbddk

openharmony 鸿蒙 capi-hidddk-hid-absaxesarray

openharmony 鸿蒙 capi-scsiperipheralddk-scsiperipheral-response

openharmony 鸿蒙 capi-scsi-peripheral-api-h

openharmony 鸿蒙 capi-hidddk-hid-relaxesarray

openharmony 鸿蒙 js-apis-driver-deviceManager

openharmony 鸿蒙 capi-hidddk-hid-eventtypearray

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/5RWRMu73