Skip to content

Commit 4930878

Browse files
authored
Merge pull request #5 from jerryneedell/jerryn_fixpylint
fix pylint issue
2 parents 60b73ff + 352a6d7 commit 4930878

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

adafruit_stmpe610.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ def __init__(self, i2c, address=_STMPE_ADDR):
251251
Check the STMPE610 was founnd
252252
Default address is 0x41 but another address can be passed in as an argument
253253
"""
254-
import adafruit_bus_device.i2c_device as i2c_device
255-
self._i2c = i2c_device.I2CDevice(i2c, address)
254+
import adafruit_bus_device.i2c_device as i2cdev
255+
self._i2c = i2cdev.I2CDevice(i2c, address)
256256
# Check device version.
257257
version = self.get_version
258258
if _STMPE_VERSION != version:
@@ -282,13 +282,13 @@ def __init__(self, spi, cs, baudrate=1000000):
282282
"""
283283
Check the STMPE610 was found,Default clock rate 1000000 - can be changed with 'baudrate'
284284
"""
285-
import adafruit_bus_device.spi_device as spi_device
286-
self._spi = spi_device.SPIDevice(spi, cs, baudrate=baudrate)
285+
import adafruit_bus_device.spi_device as spidev
286+
self._spi = spidev.SPIDevice(spi, cs, baudrate=baudrate)
287287
# Check device version.
288288
version = self.get_version
289289
if _STMPE_VERSION != version:
290290
# if it fails try SPI MODE 1 -- that is what Arduino does
291-
self._spi = spi_device.SPIDevice(spi, cs, baudrate=baudrate, polarity=0, phase=1)
291+
self._spi = spidev.SPIDevice(spi, cs, baudrate=baudrate, polarity=0, phase=1)
292292
version = self.get_version
293293
if _STMPE_VERSION != version:
294294
raise RuntimeError('Failed to find STMPE610! Chip Version 0x%x' % version)

0 commit comments

Comments
 (0)