diff options
Diffstat (limited to 'usb/UcmCxUcsi')
| -rw-r--r-- | usb/UcmCxUcsi/README.md | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/usb/UcmCxUcsi/README.md b/usb/UcmCxUcsi/README.md index 65afdb6a..6204f630 100644 --- a/usb/UcmCxUcsi/README.md +++ b/usb/UcmCxUcsi/README.md @@ -15,17 +15,20 @@ This is a sample driver that shows how to create a Windows USB Type-C port contr ## Background reading - UcmCx documentation -Start at the UcmCx documentation at [USB Type-C connector driver programming reference](https://msdn.microsoft.com/en-us/library/windows/hardware/mt188011(v=vs.85).aspx). +Start at the UcmCx documentation at [USB Type-C connector driver programming reference](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/_usbref/#type-c-driver-reference). ## Note on UCSI -Microsoft already provides an inbox UCSI driver, UcmUcsi.sys. This UcmCxUcsi sample driver is not identical to the inbox UCSI driver. Microsoft recommends that you use the inbox UcmUcsi.sys for your UCSI-compliant system rather than writing your own. This sample driver is meant for developers bringing up a UcmCx driver for their own non-UCSI platforms. For more information about the UCSI driver, reference [USB Type-C Connector System Software Interface (UCSI) driver](https://msdn.microsoft.com/en-us/library/windows/hardware/mt710944(v=vs.85).aspx). +Microsoft already provides an inbox UCSI driver, UcmUcsi.sys. This UcmCxUcsi sample driver is not identical to the inbox UCSI driver. Microsoft recommends that you use the inbox UcmUcsi.sys for your UCSI-compliant system rather than writing your own. This sample driver is meant for developers bringing up a UcmCx driver for their own non-UCSI platforms. For more information about the UCSI driver, reference [USB Type-C Connector System Software Interface (UCSI) driver](https://docs.microsoft.com/windows-hardware/drivers/usbcon/ucsi). This sample demonstrates the following: - Registration with the USB Connector Manager (UCM) class extension driver. + - Initializing the port controller's Type-C and Power Delivery capabilities. + - Performing data and power role swaps requested by UCM + - Notifying UCM of Type-C and Power Delivery events on the connector. ## Customizing the sample for your port controller @@ -41,10 +44,15 @@ In this sample, UCM-specific interactions are split apart from most of the UCSI- The following files contain methods that interface with UcmCx. - UcmCallbacks.cpp - - Contains the implementations [EVT_UCM_CONNECTOR_SET_DATA_ROLE](https://msdn.microsoft.com/en-us/library/windows/hardware/mt187818(v=vs.85).aspx) and [EVT_UCM_CONNECTOR_SET_POWER_ROLE](https://msdn.microsoft.com/en-us/library/windows/hardware/mt187818(v=vs.85).aspx). These are callbacks from UCM which ask the client driver to perform role swaps. + + - Contains the implementations [EVT_UCM_CONNECTOR_SET_DATA_ROLE](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/ucmmanager/nc-ucmmanager-evt_ucm_connector_set_data_role) and [EVT_UCM_CONNECTOR_SET_POWER_ROLE](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/ucmmanager/nc-ucmmanager-evt_ucm_connector_set_power_role). These are callbacks from UCM which ask the client driver to perform role swaps. + - UcmNotifications.cpp - - Contains methods that communicate with UcmCx using the client driver support methods described in the [USB Type-C connector driver programming reference](https://msdn.microsoft.com/en-us/library/windows/hardware/mt188011(v=vs.85).aspx). + + - Contains methods that communicate with UcmCx using the client driver support methods described in the [USB Type-C connector driver programming reference](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/_usbref/#type-c-driver-reference). + - Fdo.cpp + - FDO callbacks, functions, and types, most of which do not interface with UCM. However, the method `Fdo_EvtDeviceSelfManagedIoInit` contains the code segment which initializes the device with UCM. ### UCSI and WDF Interactions @@ -52,12 +60,17 @@ The following files contain methods that interface with UcmCx. The remainder of the files perform operations for UCSI and WDF, non-specific to UCM. - Acpi.cpp + - ACPI method evaluation helper routines. + - Driver.cpp + - Entry point to the driver. Initializes the driver with WDF. + - Ppm.cpp + - Type-C Platform Policy Manager. Main interface to talk to the UCSI-compliant hardware. ## 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. +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://docs.microsoft.com/windows-hardware/drivers/usbcon/usb-driver-development-guide) 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://techcommunity.microsoft.com/t5/Microsoft-USB-Blog/Do-I-need-to-write-a-driver-for-my-USB-Type-C-hardware/ba-p/270876) for a more detailed overview. |
