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