Skip to content

Commit c709d95

Browse files
committed
Linting
1 parent 720d46a commit c709d95

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
*.mpy
2+
.idea
13
__pycache__
24
_build
35
*.pyc
46
.env
57
build*
68
bundles
9+
*.DS_Store
10+
.eggs
11+
dist
12+
**/*.egg-info

adafruit_ra8875/ra8875.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def color565(r, g=0, b=0):
6767
return (r & 0xf8) << 8 | (g & 0xfc) << 3 | b >> 3
6868
#pylint: enable-msg=invalid-name
6969

70-
class RA8875_Device(object):
70+
class RA8875_Device():
7171
"""
7272
Base Class for the Display. Contains all the low level stuff. As well
7373
as the touch functions. Valid display sizes are currently 800x480 and 480x272.
@@ -276,7 +276,7 @@ def turn_on(self, display_on):
276276
:param bool start_on: If the display should turn on or off
277277
"""
278278
self._write_reg(reg.PWRR, reg.PWRR_NORMAL |
279-
(reg.PWRR_DISPON if display_on else reg.PWRR_DISPOFF))
279+
(reg.PWRR_DISPON if display_on else reg.PWRR_DISPOFF))
280280

281281
def reset(self):
282282
"""Perform a hard reset"""
@@ -297,7 +297,8 @@ def sleep(self, sleep):
297297
298298
:param bool sleep: Should we enable sleep mode
299299
"""
300-
self._write_reg(reg.PWRR, reg.PWRR_DISPOFF if sleep else (reg.PWRR_DISPOFF | reg.PWRR_SLEEP))
300+
self._write_reg(reg.PWRR,
301+
reg.PWRR_DISPOFF if sleep else (reg.PWRR_DISPOFF | reg.PWRR_SLEEP))
301302

302303
def _gpiox(self, gpio_on):
303304
"""Enable or Disable the RA8875 GPIOs"""
@@ -341,7 +342,7 @@ def touch_enable(self, touch_on):
341342
"""
342343
if touch_on:
343344
self._write_reg(reg.TPCR0, reg.TPCR0_ENABLE | reg.TPCR0_WAIT_4096CLK |
344-
reg.TPCR0_WAKEENABLE | self._adc_clk)
345+
reg.TPCR0_WAKEENABLE | self._adc_clk)
345346
self._write_reg(reg.TPCR1, reg.TPCR1_AUTO | reg.TPCR1_DEBOUNCE)
346347
self._write_data(self._read_reg(reg.INTC1) | reg.INTC1_TP)
347348
else:
@@ -360,7 +361,7 @@ def touched(self):
360361
self._gfx_mode() # Hack that seems to work
361362
if self._tpin.value:
362363
return False
363-
istouched = True if self._read_reg(reg.INTC2) & reg.INTC2_TP else False
364+
istouched = self._read_reg(reg.INTC2) & reg.INTC2_TP
364365
return istouched
365366

366367
def touch_read(self):

adafruit_ra8875/registers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
VPWR_HIGH = 0x80
8585

8686
FNCR0 = 0x21
87+
FNCR1 = 0x22
8788

8889
HSAW0 = 0x30
8990
VSAW0 = 0x32

0 commit comments

Comments
 (0)