Merge pull request #214 from raven-worx/gpio_reset
only cleanup the GPIOs in use instead of all GPIOs (Python)
This commit is contained in:
commit
fb3ce18166
1 changed files with 160 additions and 160 deletions
|
|
@ -86,7 +86,7 @@ class RaspberryPi:
|
|||
self.GPIO.output(self.RST_PIN, 0)
|
||||
self.GPIO.output(self.DC_PIN, 0)
|
||||
|
||||
self.GPIO.cleanup()
|
||||
self.GPIO.cleanup([self.RST_PIN, self.DC_PIN, self.CS_PIN, self.BUSY_PIN])
|
||||
|
||||
|
||||
class JetsonNano:
|
||||
|
|
@ -145,7 +145,7 @@ class JetsonNano:
|
|||
self.GPIO.output(self.RST_PIN, 0)
|
||||
self.GPIO.output(self.DC_PIN, 0)
|
||||
|
||||
self.GPIO.cleanup()
|
||||
self.GPIO.cleanup([self.RST_PIN, self.DC_PIN, self.CS_PIN, self.BUSY_PIN])
|
||||
|
||||
|
||||
if os.path.exists('/sys/bus/platform/drivers/gpiomem-bcm2835'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue