Blacking
This commit is contained in:
parent
3c51003c04
commit
efb0bee540
1 changed files with 4 additions and 6 deletions
|
|
@ -59,8 +59,8 @@ class ExtendedI2C(I2C):
|
|||
self.deinit()
|
||||
|
||||
# Check if the file /dev/i2c-{bus_id} exists and error if not
|
||||
if not path.exists(F"/dev/i2c-{bus_id}"):
|
||||
raise ValueError(F"No device found for /dev/i2c-{bus_id}")
|
||||
if not path.exists(f"/dev/i2c-{bus_id}"):
|
||||
raise ValueError(f"No device found for /dev/i2c-{bus_id}")
|
||||
# Attempt to open using _I2C
|
||||
self._i2c = _I2C(bus_id, mode=_I2C.MASTER, baudrate=frequency)
|
||||
|
||||
|
|
@ -90,10 +90,8 @@ class ExtendedSPI(SPI):
|
|||
self.deinit()
|
||||
|
||||
# Check if the file /dev/i2c-{bus_id} exists and error if not
|
||||
if not path.exists(F"/dev/spidev{bus_id}.{chip_select}"):
|
||||
raise ValueError(
|
||||
F"No device found for /dev/spidev{bus_id}.{chip_select}"
|
||||
)
|
||||
if not path.exists(f"/dev/spidev{bus_id}.{chip_select}"):
|
||||
raise ValueError(f"No device found for /dev/spidev{bus_id}.{chip_select}")
|
||||
|
||||
self._spi = _SPI((bus_id, chip_select))
|
||||
# Pins aren't used in Linux, so we just use fake pins
|
||||
|
|
|
|||
Loading…
Reference in a new issue