summaryrefslogtreecommitdiff
path: root/usb
diff options
context:
space:
mode:
authorBarry Golden <[email protected]>2019-09-06 05:20:38 -0700
committerGitHub <[email protected]>2019-09-06 05:20:38 -0700
commitbbe176e4e13cb9f963897173a935e639267a1a20 (patch)
tree34072ee3c72436e12433fd6b2166415aca3bd410 /usb
parent22af24719daf72029a70119cc6653d2a3b940549 (diff)
Diffstat (limited to 'usb')
-rw-r--r--usb/UcmCxUcsi/README.md15
-rw-r--r--usb/UcmTcpciCxClientSample/README.md13
-rw-r--r--usb/UcmUcsiAcpiSample/README.md13
-rw-r--r--usb/kmdf_enumswitches/README.md13
-rw-r--r--usb/kmdf_fx2/README.md11
-rw-r--r--usb/umdf2_fx2/README.md17
-rw-r--r--usb/umdf_filter_kmdf/README.md13
-rw-r--r--usb/umdf_filter_umdf/README.md15
-rw-r--r--usb/umdf_fx2/README.md17
-rw-r--r--usb/usbsamp/README.md27
-rw-r--r--usb/usbview/README.md31
-rw-r--r--usb/wdf_osrfx2_lab/README.md144
12 files changed, 96 insertions, 233 deletions
diff --git a/usb/UcmCxUcsi/README.md b/usb/UcmCxUcsi/README.md
index a8dc0f04..65afdb6a 100644
--- a/usb/UcmCxUcsi/README.md
+++ b/usb/UcmCxUcsi/README.md
@@ -9,20 +9,9 @@ products:
urlFragment: ucmtcpcicx-port-controller-client-driver-v2
---
-
-
-<!---
- name: UcmTcpciCx Port Controller Client Driver
- platform: KMDF
- language: cpp
- category: USB
- description: Demonstrates how to create a Windows USB Type-C port controller driver using the USB Connector Manager class extension driver (UcmCx).
- samplefwlink: https://go.microsoft.com/fwlink/p/?linkid=856744
---->
-
# UcmTcpciCx Port Controller Client Driver
-This is a sample driver that shows how to create a Windows USB Type-C port controller driver using the USB Connector Manager class extension driver (UcmCx). The sample is a driver for an embedded controller which is complient with the [USB Type-C Connector System Software Interface (UCSI)](http://www.intel.com/content/www/us/en/io/universal-serial-bus/usb-type-c-ucsi-spec.html).
+This is a sample driver that shows how to create a Windows USB Type-C port controller driver using the USB Connector Manager class extension driver (UcmCx). The sample is a driver for an embedded controller which is compliant with the [USB Type-C Connector System Software Interface (UCSI)](http://www.intel.com/content/www/us/en/io/universal-serial-bus/usb-type-c-ucsi-spec.html).
## Background reading - UcmCx documentation
@@ -71,4 +60,4 @@ The remainder of the files perform operations for UCSI and WDF, non-specific to
## When to write a UcmCx client driver
-UcmCx is intended for system port controller drivers. If you are bringing up a USB Type-C peripheral, you do not need to write a USB Type-C specific driver; a regular USB client driver will suffice. Refer to [Developing Windows client drivers for USB devices](https://msdn.microsoft.com/en-us/library/windows/hardware/hh406260(v=vs.85).aspx) to determine what type of driver, if any, you need to write to make your USB device work with Windows. You may look at [Do I need to write a driver for my USB Type-C hardware?](https://blogs.msdn.microsoft.com/usbcoreblog/2016/06/20/do-i-need-to-write-a-driver-for-my-usb-type-c-hardware/) for a more detailed overview. \ No newline at end of file
+UcmCx is intended for system port controller drivers. If you are bringing up a USB Type-C peripheral, you do not need to write a USB Type-C specific driver; a regular USB client driver will suffice. Refer to [Developing Windows client drivers for USB devices](https://msdn.microsoft.com/en-us/library/windows/hardware/hh406260(v=vs.85).aspx) to determine what type of driver, if any, you need to write to make your USB device work with Windows. You may look at [Do I need to write a driver for my USB Type-C hardware?](https://blogs.msdn.microsoft.com/usbcoreblog/2016/06/20/do-i-need-to-write-a-driver-for-my-usb-type-c-hardware/) for a more detailed overview.
diff --git a/usb/UcmTcpciCxClientSample/README.md b/usb/UcmTcpciCxClientSample/README.md
index d9d64d4a..a9a2edba 100644
--- a/usb/UcmTcpciCxClientSample/README.md
+++ b/usb/UcmTcpciCxClientSample/README.md
@@ -8,17 +8,6 @@ products:
- windows-wdk
---
-
-
-<!---
- name: UcmTcpciCx Port Controller Client Driver
- platform: KMDF
- language: cpp
- category: USB
- description: Demonstrates how to create a Windows USB Type-C port controller driver using the USB Connector Manager Type-C Port Controller Interface class extension driver (UcmTcpciCx).
- samplefwlink: https://go.microsoft.com/fwlink/p/?linkid=856745
---->
-
# UcmTcpciCx Port Controller Client Driver
This is a skeleton sample driver that shows how to create a Windows USB Type-C port controller driver using the USB Connector Manager Type-C Port Controller Interface class extension driver (UcmTcpciCx). UcmTcpciCx is currently only availble using the Windows Insider program - documentation for UcmTcpciCx will be available at the next release of Windows.
@@ -222,4 +211,4 @@ Microsoft USB Test Tools
Tracelog Command Syntax
-<https://msdn.microsoft.com/en-us/library/windows/hardware/ff553012(v=vs.85).aspx> \ No newline at end of file
+<https://msdn.microsoft.com/en-us/library/windows/hardware/ff553012(v=vs.85).aspx>
diff --git a/usb/UcmUcsiAcpiSample/README.md b/usb/UcmUcsiAcpiSample/README.md
index c427f5e1..9def12cd 100644
--- a/usb/UcmUcsiAcpiSample/README.md
+++ b/usb/UcmUcsiAcpiSample/README.md
@@ -8,17 +8,6 @@ products:
- windows-wdk
---
-
-
-<!---
- name: UcmUcsiCx Client Driver
- platform: KMDF
- language: cpp
- category: USB
- description: Demonstrates how to create a Windows UCSI client UCSI class extension driver (UcmUcsiCx).
- samplefwlink: https://github.com/Microsoft/Windows-driver-samples/tree/master/usb/UcmUcsiAcpiSample
---->
-
# UcmUcsiCx ACPI Client Driver
This is a sample driver that shows how to create a Windows USB Type-C port controller driver using the USB Connector Manager class extension driver (UcmCx). The sample is a driver for an embedded controller which is compliant with the [USB Type-C Connector System Software Interface (UCSI)](http://www.intel.com/content/www/us/en/io/universal-serial-bus/usb-type-c-ucsi-spec.html).
@@ -64,4 +53,4 @@ The remainder of the files perform operations for UCSI and WDF, non-specific to
## When to write a UcmUcsiCx client driver
-UcmUcsiCx is intended to abstract UCSI protocol from UCSI based driver support. If you have a system that implements PPM logic in an Embedded controller which is connected to the system over a non ACPI transport - e.g. USB, PCI, I2C or UART, it is advised that you write a UcmUcsiCx client driver that implements the necessary transport. Ideally, you would just need to replace Acpi class and implement your way to talk to the PPM. Please note, UcmUcsiCx client is the power policy owner. The class extension does handle S0 idling if you chose to enable it in the client driver. \ No newline at end of file
+UcmUcsiCx is intended to abstract UCSI protocol from UCSI based driver support. If you have a system that implements PPM logic in an Embedded controller which is connected to the system over a non ACPI transport - e.g. USB, PCI, I2C or UART, it is advised that you write a UcmUcsiCx client driver that implements the necessary transport. Ideally, you would just need to replace Acpi class and implement your way to talk to the PPM. Please note, UcmUcsiCx client is the power policy owner. The class extension does handle S0 idling if you chose to enable it in the client driver.
diff --git a/usb/kmdf_enumswitches/README.md b/usb/kmdf_enumswitches/README.md
index 8d60a5c6..6f8b2195 100644
--- a/usb/kmdf_enumswitches/README.md
+++ b/usb/kmdf_enumswitches/README.md
@@ -8,17 +8,6 @@ products:
- windows-wdk
---
-
-
-<!---
- name: Sample KMDF Bus Driver for OSR USB-FX2
- platform: KMDF
- language: cpp
- category: USB
- description: Demonstrates how to use KMDF as a bus driver using the OSR USB-FX2 device.
- samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618000
---->
-
# Sample KMDF Bus Driver for OSR USB-FX2
The kmdf\_enumswitches sample demonstrates how to use Kernel-Mode Driver Framework (KMDF) as a bus driver using the OSR USB-FX2 device.
@@ -61,4 +50,4 @@ Here is the overview of the device:
- Device moves data from IN endpoint to OUT endpoint.
- Device does not change the values of the data it receives nor does it internally create any data.
- Endpoints are always double buffered.
- - Maximum packet size depends on speed (64 Full speed, 512 High speed). \ No newline at end of file
+ - Maximum packet size depends on speed (64 Full speed, 512 High speed).
diff --git a/usb/kmdf_fx2/README.md b/usb/kmdf_fx2/README.md
index 56fc5ca4..8c4ce944 100644
--- a/usb/kmdf_fx2/README.md
+++ b/usb/kmdf_fx2/README.md
@@ -8,17 +8,6 @@ products:
- windows-wdk
---
-
-
-<!---
- name: Sample KMDF Function Driver for OSR USB-FX2
- platform: KMDF
- language: cpp
- category: USB
- description: Demonstrates how to use KMDF to perform bulk and interrupt data transfers to a USB device.
- samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620313
---->
-
# Sample KMDF Function Driver for OSR USB-FX2
The kmdf\_fx2 sample is a Kernel-Mode Driver Framework (KMDF) driver for the OSR USB-FX2 device. It includes a test app and sample device metadata.
diff --git a/usb/umdf2_fx2/README.md b/usb/umdf2_fx2/README.md
index 977679dc..1e9c148d 100644
--- a/usb/umdf2_fx2/README.md
+++ b/usb/umdf2_fx2/README.md
@@ -8,17 +8,6 @@ products:
- windows-wdk
---
-
-
-<!---
- name: Sample Function Driver for OSR USB-FX2 (UMDF Version 2)
- platform: UMDF2
- language: cpp
- category: USB
- description: Demonstrates a UMDF version 2 driver for the OSR USB-FX2 device.
- samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618003
---->
-
# Sample Function Driver for OSR USB-FX2 (UMDF Version 2)
The umdf2\_fx2 sample is a User-Mode Driver Framework (UMDF) version 2 driver for the OSR USB-FX2 device.
@@ -37,7 +26,7 @@ The process of moving the driver package to the target computer and installing t
### Automatic deployment (FX2 board)
-Before you automatically deploy a driver, you must provision the target computer. For instructions, see [Configuring a Computer for Driver Deployment, Testing, and Debugging](http://msdn.microsoft.com/en-us/library/windows/hardware/).
+Before you automatically deploy a driver, you must provision the target computer. For instructions, see [Provision a computer for driver deployment and testing (WDK 10)](https://docs.microsoft.com/windows-hardware/drivers/gettingstarted/provision-a-target-computer-wdk-8-1).
1. Plug in the OSR USB-FX2 board to the target computer.
1. On the host computer, in Visual Studio, in Solution Explorer, right click **package** (lower case), and choose **Properties**. Navigate to **Configuration Properties \> Driver Install \> Deployment**.
@@ -46,7 +35,7 @@ Before you automatically deploy a driver, you must provision the target computer
### Manual deployment (FX2 board)
-Before you manually deploy a driver, you must turn on test signing and install a certificate on the target computer. You also need to copy the [DevCon](http://msdn.microsoft.com/en-us/library/windows/hardware/ff544707) tool to the target computer. For instructions, see [Preparing a Computer for Manual Driver Deployment](https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/preparing-a-computer-for-manual-driver-deployment).
+Before you manually deploy a driver, you must turn on test signing and install a certificate on the target computer. You also need to copy the [DevCon](https://docs.microsoft.com/windows-hardware/drivers/devtest/devcon) tool to the target computer. For instructions, see [Preparing a Computer for Manual Driver Deployment](https://docs.microsoft.com/windows-hardware/drivers/develop/preparing-a-computer-for-manual-driver-deployment).
1. Copy all of the files in your driver package to a folder on the target computer (for example, c:\\umdf2\_fx2).
1. Plug in the OSR USB-FX2 board to the target computer. Open a Command Prompt window and enter **dvmgmt** to open Device Manager. In Device Manager, locate the node for the OSR USB-FX2 board. Right click the node, and choose **Properties**. In the **Details** tab, under **Properties**, choose **Hardware Ids**. Note the hardware IDs listed for your FX2 board. One of these IDs should match one of the IDs in the osrusbfx2um.inf file. For example, Device Manager might show an ID of USB\\VID\_0547&PID\_1002, which matches one of the IDs in the [Microsoft.*xxx*] section of osrusbfx2um.inf.
@@ -70,4 +59,4 @@ As an alternative to building the driver sample in Visual Studio, you can build
**msbuild /p:configuration=Win8 Release /p:platform=Win32 umdf2\_fx2.sln**
-For more information about using MSBuild to build a driver package, see [Building a Driver](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554644). \ No newline at end of file
+For more information about using MSBuild to build a driver package, see [Building a Driver with Visual Studio and the WDK](https://docs.microsoft.com/windows-hardware/drivers/develop/building-a-driver).
diff --git a/usb/umdf_filter_kmdf/README.md b/usb/umdf_filter_kmdf/README.md
index 8da0bd9e..438453ec 100644
--- a/usb/umdf_filter_kmdf/README.md
+++ b/usb/umdf_filter_kmdf/README.md
@@ -8,17 +8,6 @@ products:
- windows-wdk
---
-
-
-<!---
- name: Sample UMDF Filter above KMDF Function Driver for OSR USB-FX2 (UMDF Version 1)
- platform: KMDF
- language: cpp
- category: USB
- description: Demonstrates how to load a UMDF filter driver as an upper filter driver above the kmdf_fx2 sample driver.
- samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620316
---->
-
# Sample UMDF Filter above KMDF Function Driver for OSR USB-FX2 (UMDF Version 1)
The umdf\_filter\_kmdf sample demonstrates how to load a UMDF filter driver as an upper filter driver above the kmdf\_fx2 sample driver.
@@ -60,7 +49,7 @@ The default Solution build configuration is **Debug** and **Win32**.
## Testing the driver
-You can test this sample either by using the [Custom driver access](http://go.microsoft.com/fwlink/p/?LinkID=248288) sample application, or by using the osrusbfx2.exe test application. For information on how to build and use the osrusbfx2.exe application, see the test instructions for the [kmdf\_fx2](http://msdn.microsoft.com/en-us/library/windows/hardware/) sample.
+You can test this sample either by using the [Custom driver access](https://code.msdn.microsoft.com/windowsapps/Custom-device-access-sample-43bde679) sample application, or by using the osrusbfx2.exe test application. For information on how to build and use the osrusbfx2.exe application, see the test instructions for the [kmdf\_fx2](https://docs.microsoft.com/samples/microsoft/windows-driver-samples/sample-kmdf-function-driver-for-osr-usb-fx2/) sample.
## Code tour
diff --git a/usb/umdf_filter_umdf/README.md b/usb/umdf_filter_umdf/README.md
index 15b205b4..184725ca 100644
--- a/usb/umdf_filter_umdf/README.md
+++ b/usb/umdf_filter_umdf/README.md
@@ -8,17 +8,6 @@ products:
- windows-wdk
---
-
-
-<!---
- name: Sample UMDF Filter above UMDF Function Driver for OSR USB-FX2 (UMDF Version 1)
- platform: UMDF1
- language: cpp
- category: USB
- description: Demonstrates how to load a UMDF filter driver as an upper filter driver above the umdf_fx2 sample driver.
- samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618001
---->
-
# Sample UMDF Filter above UMDF Function Driver for OSR USB-FX2 (UMDF Version 1)
The umdf\_filter\_umdf sample demonstrates how to load a User-Mode Driver Framework (UMDF) filter driver as an upper filter driver above the umdf\_fx2 sample driver.
@@ -44,11 +33,11 @@ This sample is written for the OSR USB-FX2 Learning Kit. The specification for t
## Testing the driver
-You can test this sample either by using the [Custom driver access](http://go.microsoft.com/fwlink/p/?LinkID=248288) sample application, or by using the osrusbfx2.exe test application. For information on how to build and use the osrusbfx2.exe application, see the test instructions for the [umdf\_fx2](http://msdn.microsoft.com/en-us/library/windows/hardware/) sample.
+You can test this sample either by using the [Custom driver access](https://code.msdn.microsoft.com/windowsapps/Custom-device-access-sample-43bde679) sample application, or by using the osrusbfx2.exe test application. For information on how to build and use the osrusbfx2.exe application, see the test instructions for the [umdf\_fx2](https://docs.microsoft.com/samples/microsoft/windows-driver-samples/sample-umdf-filter-above-umdf-function-driver-for-osr-usb-fx2-umdf-version-1/) sample.
## Sample Contents
| Folder | Description |
| --- | --- |
| usb\umdf_filter_umdf\umdf_driver | This directory contains source code for the umdf_fx2 sample driver. |
-| usb\umdf_filter_umdf\umdf_filter | This directory contains the UMDF filter driver. | \ No newline at end of file
+| usb\umdf_filter_umdf\umdf_filter | This directory contains the UMDF filter driver. |
diff --git a/usb/umdf_fx2/README.md b/usb/umdf_fx2/README.md
index e67031e5..b38692c0 100644
--- a/usb/umdf_fx2/README.md
+++ b/usb/umdf_fx2/README.md
@@ -8,22 +8,11 @@ products:
- windows-wdk
---
-
-
-<!---
- name: Sample UMDF Function Driver for OSR USB-FX2 (UMDF version 1)
- platform: UMDF1
- language: cpp
- category: USB
- description: A UMDF driver for the OSR USB-FX2 device that includes a test application, sample device metadata, and supports impersonation and idle power down.
- samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618002
---->
-
# Sample UMDF Function Driver for OSR USB-FX2 (UMDF Version 1)
The umdf\_fx2 sample is a User-Mode Driver Framework (UMDF) driver for the OSR USB-FX2 device. It includes a test app and sample device metadata, and supports impersonation and idle power down.
-The sample can also be used with the CustomDeviceAccess MSDK sample. The sample demonstrates how to perform bulk and interrupt data transfers to an USB device. The specification for the device is at <http://www.osronline.com/hardware/OSRFX2_32.pdf>. The driver and sample device metadata also work with the [Custom driver access](http://go.microsoft.com/fwlink/p/?LinkID=248288) sample.
+The sample can also be used with the CustomDeviceAccess MSDK sample. The sample demonstrates how to perform bulk and interrupt data transfers to an USB device. The specification for the device is at <http://www.osronline.com/hardware/OSRFX2_32.pdf>. The driver and sample device metadata also work with the [Custom driver access](https://code.msdn.microsoft.com/windowsapps/Custom-device-access-sample-43bde679) sample.
The osrusbfx2 sample is divided into three samples:
@@ -61,7 +50,7 @@ The default Solution build configuration is Debug and Win32.
## Testing the driver
-You can use the [Custom driver access](http://go.microsoft.com/fwlink/p/?LinkID=248288) sample to test the umdf\_fx2 sample.
+You can use the [Custom driver access](https://code.msdn.microsoft.com/windowsapps/Custom-device-access-sample-43bde679) sample to test the umdf\_fx2 sample.
This sample also includes a test application, osrusbfx2.exe, that you can use to test the device. This console application enumerates the interface registered by the driver and opens the device to send read, write, or IOCTL requests based on the command line options.
@@ -344,4 +333,4 @@ This directory contains a test application that can be used to drive the UMDF dr
usb\\umdf\_fx2\\deviceMetadata
-This directory contains the device metadata package for the sample. You must copy the device metadata to the system before installing the device. For information on how to update and deploy device metadata, see [Custom driver access sample](http://go.microsoft.com/fwlink/p/?LinkID=248288). \ No newline at end of file
+This directory contains the device metadata package for the sample. You must copy the device metadata to the system before installing the device. For information on how to update and deploy device metadata, see [Custom driver access sample](https://code.msdn.microsoft.com/windowsapps/Custom-device-access-sample-43bde679).
diff --git a/usb/usbsamp/README.md b/usb/usbsamp/README.md
index ff839d11..0669e842 100644
--- a/usb/usbsamp/README.md
+++ b/usb/usbsamp/README.md
@@ -8,24 +8,13 @@ products:
- windows-wdk
---
-
-
-<!---
- name: Usbsamp Generic USB Driver
- platform: KMDF
- language: cpp
- category: USB
- description: Demonstrates how to perform full speed, high speed, and SuperSpeed transfers to and from bulk and isochronous endpoints of a generic USB device.
- samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618938
---->
-
# Usbsamp Generic USB Driver
-The USBSAMP sample demonstrates how to perform full speed, high speed, and SuperSpeed transfers to and from bulk and isochronous endpoints of a generic USB device. USBSAMP is based on the [Kernel Mode Driver Framework](http://msdn.microsoft.com/en-us/library/windows/hardware/ff557405) (KMDF). Superspeed bulk and isochronous transfers only work when the Microsoft USB 3.0 stack is loaded.
+The USBSAMP sample demonstrates how to perform full speed, high speed, and SuperSpeed transfers to and from bulk and isochronous endpoints of a generic USB device. USBSAMP is based on the [Kernel Mode Driver Framework](https://docs.microsoft.com/windows-hardware/drivers/kernel/) (KMDF). Superspeed bulk and isochronous transfers only work when the Microsoft USB 3.0 stack is loaded.
The sample also contains a console test application that initiates bulk (including stream) and isochronous transfers and obtains data from the device's I/O endpoints. The application also demonstrates how to use GUID-based device names and pipe names generated by the operating system using the **SetupDiXXX** user-mode APIs.
-For information about USB, see [Universal Serial Bus (USB) Drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff538930).
+For information about USB, see [Universal Serial Bus (USB) Drivers](https://docs.microsoft.com/windows-hardware/drivers/usbcon/).
## Universal Windows Driver Compliant
@@ -36,7 +25,7 @@ This sample builds a Universal Windows Driver. It uses only APIs and DDIs that a
The sample driver can be loaded as the function driver for any of these devices:
- OSR FX2 learning kit. You can get the kit from [OSR Online](http://www.osronline.com/).
-- [MUTT devices](http://msdn.microsoft.com/en-us/library/windows/hardware/dn376873). To order those devices, see [How to get MUTT devices](buses.microsoft_usb_test_tool__mutt__devices#howto).
+- [MUTT devices](https://docs.microsoft.com/windows-hardware/drivers/usbcon/microsoft-usb-test-tool--mutt--devices). To order those devices, see [How to get MUTT devices](https://docs.microsoft.com/windows-hardware/drivers/usbcon/microsoft-usb-test-tool--mutt--devices#how-to-get-mutt-devices).
- Intel 82930 USB test board.
If you have a different USB device, you can still use the driver by adding the device's hardware ID to the INX file. Note that the data transfer scenarios will work only with the endpoints supported by the device.
@@ -49,7 +38,7 @@ In Visual Studio, in Solution Explorer, right click **Solution 'usbsamp' (3 proj
In Visual Studio, on the **Build** menu, choose **Build Solution**.
-For more information about using Visual Studio to build a driver package, see [Building a Driver](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554644).
+For more information about using Visual Studio to build a driver package, see [Building a Driver with Visual Studio and the WDK](https://docs.microsoft.com/windows-hardware/drivers/develop/building-a-driver).
## Locate the built driver
@@ -71,7 +60,7 @@ The process of moving the driver package to the target computer and installing t
### Automatic deployment
-Before you automatically deploy a driver, you must provision the target computer. For instructions, see [Configuring a Computer for Driver Deployment, Testing, and Debugging](http://msdn.microsoft.com/en-us/library/windows/hardware/).
+Before you automatically deploy a driver, you must provision the target computer. For instructions, see [Provision a computer for driver deployment and testing (WDK 10)](https://docs.microsoft.com/windows-hardware/drivers/gettingstarted/provision-a-target-computer-wdk-8-1).
1. On the host computer, in Visual Studio, in Solution Explorer, right click **package** (lower case), and choose **Properties**. Navigate to **Configuration Properties \> Driver Install \> Deployment**.
1. Check **Enable deployment**, and check **Remove previous driver versions before deployment**. For **Target Computer Name**, select the name of a target computer that you provisioned previously. Select **Install and Verify**. Click **OK**.
@@ -79,7 +68,7 @@ Before you automatically deploy a driver, you must provision the target computer
### Manual deployment
-Before you manually deploy a driver, you must turn on test signing and install a certificate on the target computer. You also need to copy the [DevCon](http://msdn.microsoft.com/en-us/library/windows/hardware/ff544707) tool to the target computer. For instructions, see [Preparing a Computer for Manual Driver Deployment](https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/preparing-a-computer-for-manual-driver-deployment).
+Before you manually deploy a driver, you must turn on test signing and install a certificate on the target computer. You also need to copy the [DevCon](https://docs.microsoft.com/windows-hardware/drivers/devtest/devcon) tool to the target computer. For instructions, see [Preparing a Computer for Manual Driver Deployment](https://docs.microsoft.com/windows-hardware/drivers/develop/preparing-a-computer-for-manual-driver-deployment).
1. Copy all of the files in your driver package to a folder on the target computer (for example, c:\\Usbsamp).
1. On the target computer, open a Command Prompt window as Administrator. Navigate to your driver package folder, and enter the following command:
@@ -98,7 +87,7 @@ As an alternative to building the USBSAMP sample in Visual Studio, you can build
**msbuild /p:configuration="Release" /p:platform="Win32" Usbsamp.sln**
-For more information about using MSBuild to build a driver package, see [Building a Driver](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554644).
+For more information about using MSBuild to build a driver package, see [Building a Driver with Visual Studio and the WDK](https://docs.microsoft.com/windows-hardware/drivers/develop/building-a-driver).
## Testing the sample
@@ -154,4 +143,4 @@ The sample includes a test application, usbsamp.exe. This console application en
- To skip validation of the data to be read or written in a particular request, use the command with **-x** option as follows:
- **usbsamp.exe -r 1024 -w 1024 -c 100 -x** \ No newline at end of file
+ **usbsamp.exe -r 1024 -w 1024 -c 100 -x**
diff --git a/usb/usbview/README.md b/usb/usbview/README.md
index 7fb3d8c1..631f4861 100644
--- a/usb/usbview/README.md
+++ b/usb/usbview/README.md
@@ -8,17 +8,6 @@ products:
- windows-wdk
---
-
-
-<!---
- name: USBView sample application
- platform: WDM
- language: cpp
- category: USB
- description: Provides an application that allows you to browse all USB controllers and connected USB devices on your system.
- samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618004
---->
-
# USBView sample application
Usbview.exe is a Windows GUI application that allows you to browse all USB controllers and connected USB devices on your system. The left pane in the main application window displays a connection-oriented tree view, and the right pane displays the USB data structures pertaining to the selected USB device, such as the Device, Configuration, Interface, and Endpoint Descriptors, as well as the current device configuration.
@@ -27,15 +16,15 @@ This functional application sample demonstrates how a user-mode application can
The IOCTL calls (see the system include file USBIOCTL.H) demonstrated by this sample include:
-- [**IOCTL\_GET\_HCD\_DRIVERKEY\_NAME**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff537236)
-- [**IOCTL\_USB\_GET\_DESCRIPTOR\_FROM\_NODE\_CONNECTION**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff537310)
-- [**IOCTL\_USB\_GET\_NODE\_CONNECTION\_DRIVERKEY\_NAME**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff537317)
-- [**IOCTL\_USB\_GET\_NODE\_CONNECTION\_INFORMATION**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff537319)
-- [**IOCTL\_USB\_GET\_NODE\_CONNECTION\_NAME**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff537323)
-- [**IOCTL\_USB\_GET\_NODE\_INFORMATION**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff537324)
-- [**IOCTL\_USB\_GET\_ROOT\_HUB\_NAME**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff537326)
+- [**IOCTL\_GET\_HCD\_DRIVERKEY\_NAME**](https://docs.microsoft.com/windows/win32/api/usbuser/ni-usbuser-ioctl_get_hcd_driverkey_name)
+- [**IOCTL\_USB\_GET\_DESCRIPTOR\_FROM\_NODE\_CONNECTION**](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/usbioctl/ni-usbioctl-ioctl_usb_get_descriptor_from_node_connection)
+- [**IOCTL\_USB\_GET\_NODE\_CONNECTION\_DRIVERKEY\_NAME**](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/usbioctl/ni-usbioctl-ioctl_usb_get_node_connection_driverkey_name)
+- [**IOCTL\_USB\_GET\_NODE\_CONNECTION\_INFORMATION**](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/usbioctl/ni-usbioctl-ioctl_usb_get_node_connection_information)
+- [**IOCTL\_USB\_GET\_NODE\_CONNECTION\_NAME**](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/usbioctl/ni-usbioctl-ioctl_usb_get_node_connection_name)
+- [**IOCTL\_USB\_GET\_NODE\_INFORMATION**](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/usbioctl/ni-usbioctl-ioctl_usb_get_node_information)
+- [**IOCTL\_USB\_GET\_ROOT\_HUB\_NAME**](https://docs.microsoft.com/windows/win32/api/usbuser/ni-usbuser-ioctl_usb_get_root_hub_name)
-For information about USB, see [Universal Serial Bus (USB) Drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff538930).
+For information about USB, see [Universal Serial Bus (USB) Drivers](https://docs.microsoft.com/windows-hardware/drivers/usbcon/).
## Run the sample
@@ -49,7 +38,7 @@ For information about USB, see [Universal Serial Bus (USB) Drivers](http://msdn.
If you want to debug the sample app on a remote computer,
1. Copy the executable to a folder on the remote computer.
-1. Specify project properties as per the instructions given in [Set Up Remote Debugging for a Visual Studio Project](http://msdn.microsoft.com/en-us/library/8x6by8d2.aspx).
+1. Specify project properties as per the instructions given in [Remote Debugging](https://docs.microsoft.com/visualstudio/debugger/remote-debugging?view=vs-2015).
1. Change **Debugger** to launch to **Remote Windows Debugger**.
1. On the **Debug** menu, select **Start debugging** or hit **F5**.
@@ -89,4 +78,4 @@ The file Enum.c contains the routines that enumerate the USB bus and populate th
1. Enumerate Hubs (Root Hubs and External Hubs). Given the name of a hub, use CreateFile() to open the hub. Send the hub an IOCTL\_USB\_GET\_NODE\_INFORMATION request to get info about the hub, such as the number of downstream ports. Create a node in the tree view to represent each hub.
1. Enumerate Downstream Ports. Given a handle to an open hub and the number of downstream ports on the hub, send the hub an IOCTL\_USB\_GET\_NODE\_CONNECTION\_INFORMATION request for each downstream port of the hub to get info about the device (if any) attached to each port. If there is a device attached to a port, send the hub an IOCTL\_USB\_GET\_NODE\_CONNECTION\_NAME request to get the symbolic link name of the hub attached to the downstream port. If there is a hub attached to the downstream port, recurse to step (2). Create a node in the tree view to represent each hub port and attached device. USB configuration and string descriptors are retrieved from attached devices in GetConfigDescriptor() and GetStringDescriptor() by sending an IOCTL\_USB\_GET\_DESCRIPTOR\_FROM\_NODE\_CONNECTION() to the hub to which the device is attached.
-The file Display.c contains routines that display information about selected devices in the application edit control. Information about the device was collected during the enumeration of the device tree. This information includes USB device, configuration, and string descriptors and connection and configuration information that is maintained by the USB stack. The routines in this file simply parse and print the data structures for the device that were collected when it was enumerated. The file Dispaud.c parses and prints data structures that are specific to USB audio class devices. \ No newline at end of file
+The file Display.c contains routines that display information about selected devices in the application edit control. Information about the device was collected during the enumeration of the device tree. This information includes USB device, configuration, and string descriptors and connection and configuration information that is maintained by the USB stack. The routines in this file simply parse and print the data structures for the device that were collected when it was enumerated. The file Dispaud.c parses and prints data structures that are specific to USB audio class devices.
diff --git a/usb/wdf_osrfx2_lab/README.md b/usb/wdf_osrfx2_lab/README.md
index 21fea710..07fbc229 100644
--- a/usb/wdf_osrfx2_lab/README.md
+++ b/usb/wdf_osrfx2_lab/README.md
@@ -8,17 +8,6 @@ products:
- windows-wdk
---
-
-
-<!---
- name: WDF Sample Driver Learning Lab for OSR USB-FX2
- platform: UMDF1 KMDF
- language: cpp
- category: USB
- description: Contains a console test application and a series of iterative drivers for both KMDF and UMDF version 1.
- samplefwlink: https://go.microsoft.com/fwlink/?linkid=856746
---->
-
# WDF Sample Driver Learning Lab for OSR USB-FX2
The wdf\_osrfx2\_lab sample contains a console test application and a series of iterative drivers for both Kernel-Mode Driver Framework (KMDF) and User-Mode Driver Framework (UMDF) version 1.
@@ -27,58 +16,49 @@ In the Windows Driver Kit (WDK) for Windows 7 and earlier versions of Windows, t
Starting in Windows 8.1, the osrusbfx2 sample has been divided into these samples:
-- wdf\_osrfx2: This sample is a series of iterative drivers that demonstrate how to write a "Hello World" driver and adds additional features in each step.
+- [wdf\_osrfx2](https://docs.microsoft.com/en-us/samples/microsoft/windows-driver-samples/wdf-sample-driver-learning-lab-for-osr-usb-fx2/): This sample is a series of iterative drivers that demonstrate how to write a "Hello World" driver and adds additional features in each step.
-- [kmdf\_fx2](gallery_samples.123a_gallery#1): This sample is the final version of kernel-mode wdf\_osrfx2 driver. The sample demonstrates KMDF methods.
+- [kmdf\_fx2](https://docs.microsoft.com/en-us/samples/microsoft/windows-driver-samples/sample-kmdf-bus-driver-for-osr-usb-fx2/): This sample is the final version of kernel-mode wdf\_osrfx2 driver. The sample demonstrates KMDF methods.
-- [umdf\_fx2](http://msdn.microsoft.com/en-us/library/windows/hardware/): This sample is the final version of the user-mode driver wdf\_osrfx2. The sample demonstrates UMDF methods.
+- [umdf\_fx2](https://docs.microsoft.com/en-us/samples/microsoft/windows-driver-samples/sample-umdf-function-driver-for-osr-usb-fx2-umdf-version-1/): This sample is the final version of the user-mode driver wdf\_osrfx2. The sample demonstrates UMDF methods.
This sample is written for the OSR USB-FX2 Learning Kit. The specification for the device is at <http://www.osronline.com/hardware/OSRFX2_32.pdf>.
+## Build the sample
-Related topics
---------------
-
-[kmdf\_fx2](http://msdn.microsoft.com/en-us/library/windows/hardware/)
-
-[umdf\_fx2](http://msdn.microsoft.com/en-us/library/windows/hardware/)
+The default Solution build configuration is Windows 8.1 Debug and Win32. You can change the default configuration to build for Windows 8 or Windows 7 version of the operating system.
+### To select a configuration and build a driver
-Build the sample
-----------------
+1. Open the driver project or solution in Visual Studio 2013 (find *filtername*.sln or *filtername*.vcxproj).
-The default Solution build configuration is Windows 8.1 Debug and Win32. You can change the default configuration to build for Windows 8 or Windows 7 version of the operating system.
+1. Right-click the solution in the **Solutions Explorer** and select **Configuration Manager**.
-**To select a configuration and build a driver**
+1. From the **Configuration Manager**, select the **Active Solution Configuration** (for example, Windows 8.1 Debug or Windows 8.1 Release) and the **Active Solution Platform** (for example, Win32) that correspond to the type of build you are interested in.
+1. Each driver project in this iterative sample creates a binary with the same name, osrusbfx2.sys. As a result, you can build only the single project you're currently working on, as well as the package project. You can do this by selecting only these two projects in **Configuration Manager**.
-1. Open the driver project or solution in Visual Studio 2013 (find *filtername*.sln or *filtername*.vcxproj).
-2. Right-click the solution in the **Solutions Explorer** and select **Configuration Manager**.
-3. From the **Configuration Manager**, select the **Active Solution Configuration** (for example, Windows 8.1 Debug or Windows 8.1 Release) and the **Active Solution Platform** (for example, Win32) that correspond to the type of build you are interested in.
-4. Each driver project in this iterative sample creates a binary with the same name, osrusbfx2.sys. As a result, you can build only the single project you're currently working on, as well as the package project. You can do this by selecting only these two projects in **Configuration Manager**.
-5. From the **Build** menu, click **Build Solution** (Ctrl+Shift+B).
+1. From the **Build** menu, click **Build Solution** (Ctrl+Shift+B).
-Overview
---------
+## Overview
Here is the overview of the device:
-- The device is based on the development board supplied with the Cypress EZ-USB FX2 Development Kit (CY3681).
-- It contains 1 interface and 3 endpoints (Interrupt IN, Bulk Out, Bulk IN).
-- Firmware supports vendor commands to query or set LED Bar graph display and 7-segment LED display, and to query toggle switch states.
-- Interrupt Endpoint:
- - Sends an 8-bit value that represents the state of the switches.
- - Sent on startup, resume from suspend, and whenever the switch pack setting changes.
- - Firmware does not de-bounce the switch pack.
- - One switch change can result in multiple bytes being sent.
- - Bits are in the reverse order of the labels on the pack (for example, bit 0x80 is labeled 1 on the pack).
-- Bulk Endpoints are configured for loopback:
- - The device moves data from IN endpoint to OUT endpoint.
- - The device does not change the values of the data it receives nor does it internally create any data.
- - Endpoints are always double buffered.
- - Maximum packet size depends on speed (64 full speed, 512 high speed).
+- The device is based on the development board supplied with the Cypress EZ-USB FX2 Development Kit (CY3681).
+- It contains 1 interface and 3 endpoints (Interrupt IN, Bulk Out, Bulk IN).
+- Firmware supports vendor commands to query or set LED Bar graph display and 7-segment LED display, and to query toggle switch states.
+- Interrupt Endpoint:
+ - Sends an 8-bit value that represents the state of the switches.
+ - Sent on startup, resume from suspend, and whenever the switch pack setting changes.
+ - Firmware does not de-bounce the switch pack.
+ - One switch change can result in multiple bytes being sent.
+ - Bits are in the reverse order of the labels on the pack (for example, bit 0x80 is labeled 1 on the pack).
+- Bulk Endpoints are configured for loopback:
+ - The device moves data from IN endpoint to OUT endpoint.
+ - The device does not change the values of the data it receives nor does it internally create any data.
+ - Endpoints are always double buffered.
+ - Maximum packet size depends on speed (64 full speed, 512 high speed).
-Sample Contents for KMDF
-------------------------
+## Sample Contents for KMDF
The KMDF sample contains a console test application and a series of drivers. The driver is iterative as a series of steps, starting with a basic "Hello World" driver. Each step is describe in the following table.
@@ -95,7 +75,7 @@ Description</th>
</thead>
<tbody>
<tr class="odd">
-<td align="left">usb\wdf_osrfx2_lab\kmdf\step1
+<td align="left">usb\wdf_osrfx2_lab\kmdf\step1<br><br>
The most basic step. The source file contains a minimal amount of code to get the driver loaded in memory and respond to PnP and Power events. You can install, uninstall, disable, enable, suspend, and resume the system.</td>
<td align="left">usb\wdf_osrfx2_lab\kmdf\step2
<ol>
@@ -107,75 +87,77 @@ The most basic step. The source file contains a minimal amount of code to get th
</tbody>
</table>
-Testing the driver
-------------------
+## Testing the driver
The sample includes a test application, osrusbfx2.exe, that you can use to test the device. This console application enumerates the interface registered by the driver and opens the device to send read, write, or IOCTL requests based on the command line options.
Usage for Read/Write test:
-- -r [*n*], where *n* is number of bytes to read.
-- -w [*n*], where *n* is number of bytes to write.
-- -c [*n*], where *n* is number of iterations (default = 1).
-- -v, shows verbose read data.
-- -p, plays with Bar Display, Dip Switch, 7-Segment Display.
-- -a, performs asynchronous I/O operation.
-- -u, dumps USB configuration and pipe information.
+- -r [*n*], where *n* is number of bytes to read.
+- -w [*n*], where *n* is number of bytes to write.
+- -c [*n*], where *n* is number of iterations (default = 1).
+- -v, shows verbose read data.
+- -p, plays with Bar Display, Dip Switch, 7-Segment Display.
+- -a, performs asynchronous I/O operation.
+- -u, dumps USB configuration and pipe information.
-**Playing with the 7 segment display, toggle switches and bar graph display**
+### Playing with the 7 segment display, toggle switches and bar graph display
-Use the command **osrusbfx2.exe -p** with options 1-9 to set and clear bar graph display, set and get 7-segment state, and read the toggle switch states. The following list shows the function options:
+Use the command `osrusbfx2.exe -p` with options 1-9 to set and clear bar graph display, set and get 7-segment state, and read the toggle switch states. The following list shows the function options:
-1. Light bar
-2. Clear bar
-3. Light entire bar graph
-4. Clear entire bar graph
-5. Get bar graph state
-6. Get switch state
-7. Get switch interrupt message
-8. Get 7-segment state
-9. Set 7-segment state
+```txt
+1. Light bar
+2. Clear bar
+3. Light entire bar graph
+4. Clear entire bar graph
+5. Get bar graph state
+6. Get switch state
+7. Get switch interrupt message
+8. Get 7-segment state
+9. Set 7-segment state
10. Reset the device
11. Re-enumerate the device
0. Exit
Selection:
+```
-**Reset and re-enumerate the device**
+### Reset and re-enumerate the device
Use the command **osrusbfx2.exe -p** with option 10 and 11 to either reset the device or re-enumerate the device.
-**Read and write to bulk endpoints**
+### Read and write to bulk endpoints
The following commands send read and write requests to the device's bulk endpoint.
-- `osrusbfx2.exe -r 64`
+- `osrusbfx2.exe -r 64`
The preceding command reads 64 bytes to the bulk IN endpoint.
-- `osrusbfx2.exe -w 64 `
+- `osrusbfx2.exe -w 64`
The preceding command writes 64 bytes to the bulk OUT endpoint.
-- `osrusbfx2.exe -r 64 -w 64 -c 100 -v`
+- `osrusbfx2.exe -r 64 -w 64 -c 100 -v`
The preceding command first writes 64 bytes of data to bulk OUT endpoint (Pipe 1), then reads 64 bytes from bulk IN endpoint (Pipe 2), and then compares the read buffer with write buffer to see if they match. If the buffer contents match, it repeats this operation 100 times.
-- `osrusbfx2.exe -a`
+- `osrusbfx2.exe -a`
The preceding command reads and writes to the device asynchronously in an infinite loop.
The bulk endpoints are double buffered. Depending on the operational speed (full or high), the buffer size is either 64 bytes or 512 bytes, respectively. A request to read data doesn't complete if the buffers are empty. If the buffers are full, a request to write data does not complete until the buffers are emptied. When you are doing a synchronous read, make sure the endpoint buffer has data (for example, when you send 512 bytes write request to the device operating in full speed mode). Because the endpoints are double buffered, the total buffer capacity is 256 bytes. The first 256 bytes fills the buffer and the write request waits in the USB stack until the buffers are emptied. If you run another instance of the application to read 512 bytes of data, both write and read requests complete successfully.
-**Displaying descriptors**
+### Displaying descriptors
The following command displays all the descriptors and endpoint information.
-**osrusbfx2.exe -u**
+`osrusbfx2.exe -u`
If the device is operating in high speed mode, you get the following information:
+```txt
`===================`
`USB_CONFIGURATION_DESCRIPTOR`
@@ -267,9 +249,11 @@ If the device is operating in high speed mode, you get the following information
`wMaxPacketSize= 0x200, decimal 512`
`bInterval = 0x0, decimal 0`
+```
If the device is operating in low speed mode, you will get the following information:
+```txt
`===================`
`USB_CONFIGURATION_DESCRIPTOR`
@@ -357,9 +341,9 @@ If the device is operating in low speed mode, you will get the following informa
`wMaxPacketSize= 0x40, decimal 64`
`bInterval = 0x0, decimal 0 `
+```
-Sample Contents for UMDF
-------------------------
+## Sample Contents for UMDF
The UMDF sample driver is developed as a series of steps, starting with a basic "Hello World" driver. Each step progressively adds functionality to the previous step. Each step is described in the following table.
@@ -376,7 +360,7 @@ Description</th>
</thead>
<tbody>
<tr class="odd">
-<td align="left">usb\wdf_osrfx2_lab\umdf\step1
+<td align="left">usb\wdf_osrfx2_lab\umdf\step1<br><br>
The most basic step. The source file contains a minimal amount of code to get the driver loaded in memory and respond to PnP and Power events. You can install, uninstall, disable, enable, suspend, and resume the system.</td>
<td align="left">usb\wdf_osrfx2_lab\umdf\step2
<ol>
@@ -385,4 +369,4 @@ The most basic step. The source file contains a minimal amount of code to get th
</ol></td>
</tr>
</tbody>
-</table> \ No newline at end of file
+</table>