Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Simple Peripheral Bus (SPB) Drivers

Develop drivers for simple peripheral bus (SPB) controllers and for SPB-connected peripheral devices. The SPB category includes synchronous serial buses such as I²C and SPI.

An SPB peripheral device driver sends I/O requests to a device that is connected to an I²C, SPI, or similar bus. An SPB controller driver handles these I/O requests. Typically, these bus types provide low-pin-count connections to relatively low-speed peripheral devices on motherboards and in mobile devices, such as smart phones.

Support in Windows versions

  • Starting with Windows 10, the driver programming interfaces are part of OneCoreUAP-based editions of Windows. By using that common set, you can write a Universal Windows driver for SPB controllers and for SPB-connected peripheral devices. Those drivers will run on both Windows 10 for desktop editions (Home, Pro, and Enterprise) and Windows 10 Mobile, as well as other Windows 10 versions.

  • Windows 8 introduced driver support for SPBs.

Microsoft-provided binaries for SPB

These binaries are included in OneCoreUAP-based editions of Windows.

I/O flow

Your SPB controller driver is a KMDF driver that statically links to Spbcx.lib. The driver communicates with Spbcx.sys.

Your SPB-connected peripheral device driver is a UMDF or KMDF driver that communicates with the device through an I/O request interface that is managed by Spbcx.sys on behalf of an SPB controller driver.

Documentation for developing an SPB controller driver

The following topics describe the structures, methods, and I/O requests that are defined by Windows to support SPB controller drivers.

Note  These programming interfaces are included in OneCoreUAP-based editions of Windows.

SPB Controller Drivers

SpbCx Object Handles

SpbCx Event Callback Functions

SpbCx Structures and Enumerations

Initialization Functions for SpbCx Structures

SpbCx Driver Support Methods

SpbCx I/O Control Codes

Documentation for developing a SPB-connected peripheral device driver

This section is intended for use by C/C++ programmers who are familiar with Windows Driver Frameworks (WDF). For more information about basic driver development, see Getting Started with Windows Drivers. For more information about WDF driver development, see the following topics.

Note  If you intend to write a user-mode driver that runs on OneCoreUAP-based editions of Windows, it must use UMDF 2.0 programming interfaces. UMDF 1.0 drivers are not supported on those editions.

SPB Peripheral Device Drivers

Write a UMDF driver based on a template

Write a KMDF driver based on a template

Windows Driver Frameworks

WDF Reference

Create a Universal Windows driver for SPB

For step-by-step guidance, see Getting Started with Universal Windows drivers. Here is a summary of the steps:

  1. Create a new skeleton driver project based on either the User Mode Driver (UMDF V2) or Kernel Mode Driver (KMDF) driver templates in the unified WDK.

  2. In the project properties, set Target Platform to Universal.

  3. Create an installation package:

    • If your target is a device that is running Windows 10 for desktop editions, see Using a configurable INF file and Validating an INF File.

    • If your target is a device that is running Windows 10 Mobile, use PkgGen to generate an .spkg file.

  4. Build, install, deploy, and debug the driver for Windows 10.

Convert an existing SPB driver to a Universal Windows driver

  1. Determine whether your existing driver calls will run on OneCoreUAP Windows.

    • Use the ApiValidator.exe tool included in the Windows Driver Kit (WDK) for Windows 10. See, Validating Universal Windows drivers.
    • Check the Requirements section of the reference page.
  2. Recompile your driver as a Universal Windows driver. In the project properties, set Target Platform to Universal.

  3. If the driver calls interfaces that are not part of OneCoreUAP, the compiler displays errors.

  4. Replace those calls with alternate calls, or have a code workaround, or write a new driver.

SPB samples

The SpbAccelerometer driver sample runs on OneCoreUAP-based editions of Windows.

For a step-by-step walkthrough, see Universal sensor driver model for Windows 10.

 

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft