diff --git a/adafruit_pn532/adafruit_pn532.py b/adafruit_pn532/adafruit_pn532.py index 7379a5a..d6100e7 100644 --- a/adafruit_pn532/adafruit_pn532.py +++ b/adafruit_pn532/adafruit_pn532.py @@ -343,12 +343,12 @@ class PN532: hard power down is performed, if not, a soft power down is performed instead. Returns True if the PN532 was powered down successfully or False if not.""" - if self._reset_pin: # Hard Power Down if the reset pin is connected + if self._reset_pin: # Hard Power Down if the reset pin is connected self._reset_pin.value = False self.low_power = True else: # Soft Power Down otherwise. Enable wakeup on I2C, SPI, UART - response = self.call_function(_COMMAND_POWERDOWN, params=[0xb0, 0x00]) + response = self.call_function(_COMMAND_POWERDOWN, params=[0xB0, 0x00]) self.low_power = response[0] == 0x00 time.sleep(0.005) return self.low_power diff --git a/adafruit_pn532/i2c.py b/adafruit_pn532/i2c.py index 9c3ee09..463b988 100644 --- a/adafruit_pn532/i2c.py +++ b/adafruit_pn532/i2c.py @@ -71,7 +71,7 @@ class PN532_I2C(PN532): self._req.value = True time.sleep(0.01) self.low_power = False - self.SAM_configuration() # Put the PN532 back in normal mode + self.SAM_configuration() # Put the PN532 back in normal mode def _wait_ready(self, timeout=1): """Poll PN532 if status byte is ready, up to `timeout` seconds""" diff --git a/adafruit_pn532/spi.py b/adafruit_pn532/spi.py index 943dad5..627584b 100644 --- a/adafruit_pn532/spi.py +++ b/adafruit_pn532/spi.py @@ -79,7 +79,7 @@ class PN532_SPI(PN532): spi.write(bytearray([0x00])) # pylint: disable=no-member time.sleep(0.01) self.low_power = False - self.SAM_configuration() # Put the PN532 back in normal mode + self.SAM_configuration() # Put the PN532 back in normal mode def _wait_ready(self, timeout=1): """Poll PN532 if status byte is ready, up to `timeout` seconds""" diff --git a/adafruit_pn532/uart.py b/adafruit_pn532/uart.py index e52d22b..915bc5b 100644 --- a/adafruit_pn532/uart.py +++ b/adafruit_pn532/uart.py @@ -61,7 +61,7 @@ class PN532_UART(PN532): self.low_power = False self._uart.write( b"\x55\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - ) # wake up! + ) # wake up! self.SAM_configuration() def _wait_ready(self, timeout=1): @@ -69,7 +69,7 @@ class PN532_UART(PN532): timestamp = time.monotonic() while (time.monotonic() - timestamp) < timeout: if self._uart.in_waiting > 0: - return True # No Longer Busy + return True # No Longer Busy time.sleep(0.01) # lets ask again soon! # Timed out! return False