harmony 鸿蒙usb_serial_types.h

  • 2025-06-12
  • 浏览 (4)

usb_serial_types.h

Overview

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

Library: libusb_serial.z.so

File to include: <serial/usb_serial_types.h>

System capability: SystemCapability.Driver.SERIAL.Extension

Since: 18

Related module: USB Serial DDK

Summary

Structs

Name Description
struct  UsbSerial_Params Defines the USB serial port parameters for the USB Serial DDK.

Types

Name Description
typedef struct UsbSerial_DeviceHandle UsbSerial_DeviceHandle Data structure of the USB serial port device (opaque).
typedef struct UsbSerial_Params _attribute_((aligned(8))) UsbSerial_Params USB serial port parameters used by the USB Serial DDK.

Enums

Name Description
UsbSerial_DdkRetCode {
USB_SERIAL_DDK_NO_PERM = 201, USB_SERIAL_DDK_INVALID_PARAMETER = 401, USB_SERIAL_DDK_SUCCESS = 31600000, USB_SERIAL_DDK_INVALID_OPERATION = 31600001, USB_SERIAL_DDK_INIT_ERROR = 31600002, USB_SERIAL_DDK_SERVICE_ERROR = 31600003, USB_SERIAL_DDK_MEMORY_ERROR = 31600004, USB_SERIAL_DDK_IO_ERROR = 31600005, USB_SERIAL_DDK_DEVICE_NOT_FOUND = 31600006
}
Defines the return codes used by the USB Serial DDK.
UsbSerial_FlowControl { USB_SERIAL_NO_FLOW_CONTROL = 0, USB_SERIAL_SOFTWARE_FLOW_CONTROL = 1, USB_SERIAL_HARDWARE_FLOW_CONTROL = 2 } Defines the flow control mode for the USB Serial DDK.
UsbSerial_Parity { USB_SERIAL_PARITY_NONE = 0, USB_SERIAL_PARITY_ODD = 1, USB_SERIAL_PARITY_EVEN = 2 } Defines the enums of the parity parameter used by the USB Serial DDK.

Variables

Name Description
uint32_t baudRate Baud rate.
uint8_t nDataBits Number of data transfer bits.
uint8_t nStopBits Number of data stop bits.
uint8_t parity Parity settings.

Variable Description

baudRate

uint32_t baudRate

Description

Baud rate.

nDataBits

uint8_t nDataBits

Description

Number of data transfer bits.

nStopBits

uint8_t nStopBits

Description

Number of data stop bits.

parity

uint8_t parity

Description

Parity settings.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Driver Development Kit

harmony 鸿蒙Base DDK

harmony 鸿蒙DDK_Ashmem

harmony 鸿蒙Hid_AbsAxesArray

harmony 鸿蒙Hid_Device

harmony 鸿蒙Hid_EmitItem

harmony 鸿蒙Hid_EventProperties

harmony 鸿蒙Hid_EventTypeArray

harmony 鸿蒙Hid_KeyCodeArray

harmony 鸿蒙Hid_MscEventArray

0  赞