⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 winrtusbctl.h

📁 蓝牙芯片ZV4301的调试工具源码.做蓝牙产品时很有参考价值内部有串口的编程序源码,对有串口编成需求的同志有参考价值.
💻 H
📖 第 1 页 / 共 2 页
字号:
                                USHORT       Index,
                                BOOLEAN      HostToDevice,
                                ULONG        Length,
                                PUCHAR       pBuffer,
                                PULONG       pReturnLength,
                                LPOVERLAPPED pOverlapped);

/////////////////////////////////////////////////////////////////////////////
// WinRTAsynchInterruptTransfer - Perform an asynchronous interrupt transfer
// Parameters:
//   hDevice - handle of the device to perform the transfer
//   Endpoint - the endpoint to transfer on
//   Length - the length of the transfer
//   pBuffer - the buffer to transfer
//   pReturnLength - the number of bytes return from the function
//   pOverlapped - the overlapped structure
// Notes: returns a Win32 status code
/////////////////////////////////////////////////////////////////////////////
LONG WinRTAsynchInterruptTransfer(HANDLE       hDevice,
                                  UCHAR        Endpoint,
                                  ULONG        Length,
                                  PUCHAR       pBuffer,
                                  PULONG       pReturnLength,
                                  LPOVERLAPPED pOverlapped);

/////////////////////////////////////////////////////////////////////////////
// WinRTAsynchIsochronousTransfer - Perform an asynchronous isochronous transfer
// Parameters:
//   hDevice - handle of the device to perform the transfer
//   Endpoint - the endpoint to transfer on
//   NumberOfPackets - the number of packets to transfer
//   PacketSize - the size of the packets
//   Length - the length of the transfer buffer
//   pBuffer - the buffer to transfer
//   pReturnLength - the number of bytes returned by the driver
//   pOverlapped - the overlapped structure
// Notes: returns a Win32 status code
/////////////////////////////////////////////////////////////////////////////
LONG WinRTAsynchIsochronousTransfer(HANDLE       hDevice,
                                    UCHAR        Endpoint,
                                    ULONG        NumberOfPackets,
                                    ULONG        PacketSize,
                                    ULONG        Length,
                                    PUCHAR       pBuffer,
                                    PULONG       pReturnLength,
                                    LPOVERLAPPED pOverlapped);


/////////////////////////////////////////////////////////////////////////////
// WinRTGetDeviceDescriptor - Gets the device's device descriptor
// Parameters:
//   hDevice - handle to device
//   pDescriptor - the device descriptor
// Notes: returns a Win32 status code
/////////////////////////////////////////////////////////////////////////////
LONG WinRTGetDeviceDescriptor(HANDLE                      hDevice, 
                              PWINRTUSB_DEVICE_DESCRIPTOR pDescriptor);

/////////////////////////////////////////////////////////////////////////////
// WinRTGetConfigDescriptor - Gets the device's configuration descriptor
// Parameters:
//   hDevice - handle to device
//   pDescriptor - the configuration descriptor
// Notes: returns a Win32 status code
/////////////////////////////////////////////////////////////////////////////
LONG WinRTGetConfigDescriptor(HANDLE                             hDevice,
                              PWINRTUSB_CONFIGURATION_DESCRIPTOR pDescriptor);

/////////////////////////////////////////////////////////////////////////////
// WinRTGetInterfaceDescriptor - Gets the device's currently selected 
//      interface descriptor
// Parameters:
//   hDevice - handle to device
//   pDescriptor - the interface descriptor
// Notes: returns a Win32 status code
/////////////////////////////////////////////////////////////////////////////
LONG WinRTGetInterfaceDescriptor(HANDLE                         hDevice,
                                 PWINRTUSB_INTERFACE_DESCRIPTOR pDescriptor);

/////////////////////////////////////////////////////////////////////////////
// WinRTGetEndpointDescriptor - Gets an endpoint descriptor from the device
// Parameters:
//   hDevice - handle to device
//   Endpoint - the endpoint to get the descriptor for
//   pDescriptor - the endpoint descriptor
// Notes: returns a Win32 status code
/////////////////////////////////////////////////////////////////////////////
LONG WinRTGetEndpointDescriptor(HANDLE                        hDevice,
                                UCHAR                         Endpoint,
                                PWINRTUSB_ENDPOINT_DESCRIPTOR pDescriptor);

/////////////////////////////////////////////////////////////////////////////
// WinRTGetDriverVersion - Gets the driver version
// Parameters:
//   hDevice - handle to the driver
//   pMajorVersion - pointer to the major version
//   pMinorVersion - pointer to the minor version
// Notes: returns a Win32 status code
/////////////////////////////////////////////////////////////////////////////
LONG WinRTGetDriverVersion(HANDLE hDevice,
                           PULONG pMajorVersion,
                           PULONG pMinorVersion);

/////////////////////////////////////////////////////////////////////////////
// WinRTClearStall - Clears a stalled endpoint
// Parameters:
//   hDevice - handle to the device
//   Endpoint - the endpoint to clear
// Notes: returns a Win32 status code
/////////////////////////////////////////////////////////////////////////////
LONG WinRTClearStall(HANDLE hDevice,
                     UCHAR  Endpoint);

/////////////////////////////////////////////////////////////////////////////
// WinRTCheckAsynchCompletion - Checks an overlapped structure to see if
//      the asynchronous call made with that structure has completed
// Parameters:
//   hDevice - handle to the device
//   pReturnLength - pointer to the number of bytes return by the asynchronous call
//   pOverlapped - pointer to the overlapped structure
// Notes: returns a Win32 status code
/////////////////////////////////////////////////////////////////////////////
LONG WinRTCheckAsynchCompletion(HANDLE       hDevice,
                                PULONG       pReturnLength,
                                LPOVERLAPPED pOverlapped);

/////////////////////////////////////////////////////////////////////////////
// WinRTGetNumberOfLanguageIds - Gets the number oflanguage ids supported by a device
// Parameters:
//   hDevice - handle to the device
//   pNumberOfIds - the number of ids
// Notes: returns a Win32 status code
/////////////////////////////////////////////////////////////////////////////
LONG WinRTGetNumberOfLanguageIds(HANDLE  hDevice,
                                 PUSHORT NumberOfIds);

/////////////////////////////////////////////////////////////////////////////
// WinRTGetLanguageIds - Gets the language ids supported by a device
// Parameters:
//   hDevice - handle to the device
//   NumberOfIds - the number of ids
//   pLanguageIds - pointer to the array of ids
// Notes: returns a Win32 status code
/////////////////////////////////////////////////////////////////////////////
LONG WinRTGetLanguageIds(HANDLE  hDevice,
                         USHORT  NumberOfIds,
                         PUSHORT pLanguageIds);

/////////////////////////////////////////////////////////////////////////////
// WinRTGetStringDescriptorLength - Gets the length of a string descriptor
//   hDevice - handle to the device
//   LanguageIds - the language id
//   DescriptorIndex - the index of the string descriptor to retrieve
//   pStringLength - pointer to the length, in bytes, of the string buffer
// Notes: returns a Win32 status code
/////////////////////////////////////////////////////////////////////////////
LONG WinRTGetStringDescriptorLength(HANDLE  hDevice,
                                    USHORT  LanguageId,
                                    ULONG   DescriptorIndex,
                                    PULONG  pStringLength);

/////////////////////////////////////////////////////////////////////////////
// WinRTGetStringDescriptor - Gets a string descriptor
//   hDevice - handle to the device
//   LanguageIds - the language id
//   DescriptorIndex - the index of the string descriptor to retrieve
//   StringLength - the length, in bytes, of the string buffer
//   pString - the string buffer
// Notes: returns a Win32 status code
/////////////////////////////////////////////////////////////////////////////
LONG WinRTGetStringDescriptor(HANDLE    hDevice,
                              USHORT    LanguageId,
                              ULONG     DescriptorIndex,
                              ULONG     StringLength,
                              PCHAR     pString);

/////////////////////////////////////////////////////////////////////////////
// WinRTSelectInterface - Selects a new interface setting for this device
//   hDevice - handle to the device
//   Interface - the new interface
//   AlternateSetting - the new alternate setting for the interface
// Notes: returns a Win32 status code
/////////////////////////////////////////////////////////////////////////////
LONG WinRTSelectInterface(HANDLE hDevice,
                          ULONG  Interface,
                          ULONG  AlternateSetting);

/////////////////////////////////////////////////////////////////////////////
// WinRTUsbTrace - Trace a string to the trace buffer
//   pTraceString - string to trace
//   Count - number of TCHARs to trace
// Notes:   returns a Win32 status code
/////////////////////////////////////////////////////////////////////////////
LONG WinRTUsbTrace(LPCTSTR pTraceString, ULONG Count);

/////////////////////////////////////////////////////////////////////////////
// WinRTGetGuid - Gets the GUID associated with the device class
//   hDevice - handle to the device
//   pGuid - pointer to the guid
// Notes:   returns a Win32 status code
/////////////////////////////////////////////////////////////////////////////
LONG WinRTGetGuid(HANDLE hDevice, GUID *pGuid);

/////////////////////////////////////////////////////////////////////////////
// WinRTRegisterDeviceNotification - specifies the device or type of device
//  for which a window will receive notifications
//   hRecipient - handle to the window to receive device events
//   NotificationFilter - pointer to a block of data that specifies the 
//      type of device for which notifications should be sent
//   Flags - specifies the handle type
// Notes: if the function succeeds, the return value is a device 
//  notification handle.  if the function fails, the return value is NULL.
//  call GetLastError for more information.
// See the MSDN documentation of RegisterDeviceNotification for more
//  information
/////////////////////////////////////////////////////////////////////////////
HDEVNOTIFY WinRTRegisterDeviceNotification(HANDLE hRecipient,
                                           LPVOID NotificationFilter,
                                           DWORD Flags);

/////////////////////////////////////////////////////////////////////////////
// WinRTUnregisterDeviceNotification - closes the specified device 
//  notification handle
// Parameters:
//   Handle	- the handle to close
// See the MSDN documentation of UnregisterDeviceNotification for more
//  information
/////////////////////////////////////////////////////////////////////////////
BOOL WinRTUnregisterDeviceNotification(HDEVNOTIFY Handle);
#endif WINRTUSB_INTERNAL
#ifdef __cplusplus
}
#endif //__cplusplus

#endif // _WINRTUSB_CTL_H_l

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -