Skip to content

Commit 97d3944

Browse files
committed
add SPIDevice type to device_drivers.py
1 parent e057503 commit 97d3944

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

circuitpython_typing/device_drivers.py

+8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"""
1111

1212
from adafruit_bus_device.i2c_device import I2CDevice
13+
from adafruit_bus_device.spi_device import SPIDevice
1314
from typing_extensions import Protocol # Safety import for Python 3.7
1415

1516

@@ -18,3 +19,10 @@ class I2CDeviceDriver(Protocol):
1819
"""Describes classes that are drivers utilizing `I2CDevice`"""
1920

2021
i2c_device: I2CDevice
22+
23+
24+
# pylint: disable=too-few-public-methods
25+
class SPIDeviceDriver(Protocol):
26+
"""Describes classes that are drivers utilizing `SPIDevice`"""
27+
28+
spi_device: SPIDevice

0 commit comments

Comments
 (0)