usb_ddk_interface.h
|
int32_t UsbInitHostSdk(struct UsbSession **session);
|
USB主机端驱动开发工具包初始化
|
int32_t UsbExitHostSdk(const struct UsbSession *session);
|
USB主机端驱动开发工具包退出
|
struct UsbInterface *UsbClaimInterface(const struct UsbSession *session, uint8_t busNum, uint8_t usbAddr, uint8_t interfaceIndex);
|
获取USB接口对象
|
int32_t UsbReleaseInterface(const struct UsbInterface *interfaceObj);
|
释放USB接口对象
|
int32_t UsbAddOrRemoveInterface(const struct UsbSession *session, uint8_t busNum, uint8_t usbAddr, uint8_t interfaceIndex, UsbInterfaceStatus status);
|
增加移除接口
|
UsbInterfaceHandle *UsbOpenInterface(const struct UsbInterface *interfaceObj);
|
打开USB对象接口
|
int32_t UsbCloseInterface(const UsbInterfaceHandle *interfaceHandle);
|
关闭USB接口对象
|
int32_t UsbSelectInterfaceSetting(const UsbInterfaceHandle *interfaceHandle, uint8_t settingIndex, struct UsbInterface **interfaceObj);
|
设置可选配置
|
int32_t UsbGetPipeInfo(const UsbInterfaceHandle *interfaceHandle, uint8_t settingIndex, uint8_t pipeId, struct UsbPipeInfo *pipeInfo);
|
获取指定可选设置的管道信息
|
int32_t UsbClearInterfaceHalt(const UsbInterfaceHandle *interfaceHandle, uint8_t pipeAddress);
|
清除指定索引的管道状态
|
struct UsbRequest *UsbAllocRequest(const UsbInterfaceHandle *interfaceHandle, int32_t isoPackets, int32_t length);
|
分配请求对象
|
int32_t UsbFreeRequest(const struct UsbRequest *request);
|
释放请求对象
|
int32_t UsbSubmitRequestAsync(const struct UsbRequest *request);
|
发送异步请求
|
int32_t UsbFillRequest(const struct UsbRequest *request, const UsbInterfaceHandle *interfaceHandle, const struct UsbRequestParams *params);
|
填充请求
|
int32_t UsbCancelRequest(const struct UsbRequest *request);
|
取消异步请求
|
int32_t UsbSubmitRequestSync(const struct UsbRequest *request);
|
发送同步请求
|
usb_raw_api.h
|
int32_t UsbRawInit(struct UsbSession **session);
|
USB驱动开发工具包专家模式初始化
|
int32_t UsbRawExit(const struct UsbSession *session);
|
USB驱动开发工具包专家模式退出
|
UsbRawHandle *UsbRawOpenDevice(const struct UsbSession *session, uint8_t busNum, uint8_t usbAddr);
|
打开USB设备对象
|
int32_t UsbRawCloseDevice(const UsbRawHandle *devHandle);
|
关闭USB设备对象
|
int32_t UsbRawSendControlRequest(const struct UsbRawRequest *request, const UsbRawHandle *devHandle, const struct UsbControlRequestData *requestData);
|
执行同步控制传输
|
int32_t UsbRawSendBulkRequest(const struct UsbRawRequest *request, const UsbRawHandle *devHandle, const struct UsbRequestData *requestData);
|
执行同步批量传输
|
int32_t UsbRawSendInterruptRequest(const struct UsbRawRequest *request, const UsbRawHandle *devHandle, const struct UsbRequestData *requestData);
|
执行同步中断传输
|
int32_t UsbRawGetConfigDescriptor(const UsbRawDevice *rawDev, uint8_t configIndex, struct UsbRawConfigDescriptor **config);
|
获取给定设备指定ID的设备配置描述符
|
void UsbRawFreeConfigDescriptor(const struct UsbRawConfigDescriptor *config);
|
释放配置描述符内存空间
|
int32_t UsbRawGetConfiguration(const UsbRawHandle *devHandle, int32_t *config);
|
获取当前激活配置
|
int32_t UsbRawSetConfiguration(const UsbRawHandle *devHandle, int32_t config);
|
设置当前激活配置
|
int32_t UsbRawGetDescriptor(const struct UsbRawRequest *request, const UsbRawHandle *devHandle, const struct UsbRawDescriptorParam *param, const unsigned char *data);
|
获取描述符信息
|
UsbRawDevice *UsbRawGetDevice(const UsbRawHandle *devHandle);
|
由设备句柄获取设备指针
|
int32_t UsbRawGetDeviceDescriptor(const UsbRawDevice *rawDev, struct UsbDeviceDescriptor *desc);
|
获取给定设备的USB设备描述符
|
int32_t UsbRawClaimInterface(const UsbRawHandle *devHandle, int32_t interfaceNumber);
|
声明给定设备句柄上的接口
|
int32_t UsbRawReleaseInterface(const UsbRawHandle *devHandle, int32_t interfaceNumber);
|
释放之前声明的接口
|
int32_t UsbRawResetDevice(const UsbRawHandle *devHandle);
|
复位设备
|
struct UsbRawRequest *UsbRawAllocRequest(const UsbRawHandle *devHandle, int32_t isoPackets, int32_t length);
|
分配一个带有指定数量的同步包描述符的传输请求
|
int32_t UsbRawFreeRequest(const struct UsbRawRequest *request);
|
释放之前分配的传输请求
|
int32_t UsbRawFillBulkRequest(const struct UsbRawRequest *request, const UsbRawHandle *devHandle, const struct UsbRawFillRequestData *fillData);
|
填充批量传输请求所需信息
|
int32_t UsbRawFillControlSetup(const unsigned char *setup, const struct UsbControlRequestData *requestData);
|
填充控制传输设置包所需信息
|
int32_t UsbRawFillControlRequest(const struct UsbRawRequest *request, const UsbRawHandle *devHandle, const struct UsbRawFillRequestData *fillData);
|
填充控制传输请求所需信息
|
int32_t UsbRawFillInterruptRequest(const struct UsbRawRequest *request, const UsbRawHandle *devHandle, const struct UsbRawFillRequestData *fillData);
|
填充中断传输请求所需信息
|
int32_t UsbRawFillIsoRequest(const struct UsbRawRequest *request, const UsbRawHandle *devHandle, const struct UsbRawFillRequestData *fillData);
|
填充同步传输(Isochronous Transfers)请求所需信息
|
int32_t UsbRawSubmitRequest(const struct UsbRawRequest *request);
|
提交一个传输请求
|
int32_t UsbRawCancelRequest(const struct UsbRawRequest *request);
|
取消一个传输请求
|
int32_t UsbRawHandleRequests(const UsbRawHandle *devHandle);
|
传输请求事件完成处理
|