SPB is simple peripheral bus abbreviation, literal translation is simply peripheral buses, which include the I²c bus, SPI Bus. SPB is supported only after Windows 8, and before the system wants to access the I²C peripherals, it can only be accessed indirectly through the BIOS program, without direct access to the peripheral registers. at system startup, the ACPI firmware scans the SPB device against the configuration table and passes their resource information to the PNP (Plug and Play device) Manager, which includes the i²c slave address , thei²c bus clock frequency , and the device's interrupt number . It is important to note that in the ACPI Resource Configuration table, such storage mapping method such as memory32fixed is not allowed, because an i²c device cannot be mapped by the system address, and they can only be accessed via the I²c bus. The protocol on the I²C bus is not the main content of this article, if you do not know the Internet, please check it in advance, and then read this article.
As with Gpio drivers, SPB Drivers are also divided into SPB controller drivers ,SPB Framework (SPBCX) , and SPB peripheral drivers .
SPB Controller Driver : operates the SPB control register directly, is related to the controller hardware, and transmits the data to the SPBCX in the way of event callbacks.
SPB Framework : Responsible for connecting the middle tier of SPB Controller Driver and Periphera Device Driver, to realize the details of data interaction between peripheral driver and controller driver, and also to provide great benefits for platform porting.
SPB Peripheral Driver : Driver for the specific peripheral connected to SPB (I²C), related to peripheral hardware, to SPBCX for peripheral control by sending I/O requests. It does not care about the specific operations of the underlying SPB controller.
Microsoft's adoption of such a framework greatly facilitates the development of I²C peripheral drivers for mobile phone drivers, because our drivers only need to deal with SPBCX, without having to care about the specifics of the SOC hardware platform, even if a change in the SOC,I2C controller register address has changed, Our peripheral drivers do not need to make any changes to work properly, and often with the platform hardware-related I²C controller drivers are done by the SOC platform manufacturers, so that the development of mobile phone drivers to reduce the workload, shorten the project development cycle.
Clearly shows the relationship of the three (image from MSDN):
or This picture:
For more information about the SPB driver, please refer to the official MSDN documentation: SimplePeripheral buses
Introduction to Windows Phone 8.1 driver Development--SPB