File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -343,12 +343,12 @@ def power_down(self):
343
343
hard power down is performed, if not, a soft power down is performed
344
344
instead. Returns True if the PN532 was powered down successfully or
345
345
False if not."""
346
- if self ._reset_pin : # Hard Power Down if the reset pin is connected
346
+ if self ._reset_pin : # Hard Power Down if the reset pin is connected
347
347
self ._reset_pin .value = False
348
348
self .low_power = True
349
349
else :
350
350
# Soft Power Down otherwise. Enable wakeup on I2C, SPI, UART
351
- response = self .call_function (_COMMAND_POWERDOWN , params = [0xb0 , 0x00 ])
351
+ response = self .call_function (_COMMAND_POWERDOWN , params = [0xB0 , 0x00 ])
352
352
self .low_power = response [0 ] == 0x00
353
353
time .sleep (0.005 )
354
354
return self .low_power
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ def _wakeup(self): # pylint: disable=no-self-use
71
71
self ._req .value = True
72
72
time .sleep (0.01 )
73
73
self .low_power = False
74
- self .SAM_configuration () # Put the PN532 back in normal mode
74
+ self .SAM_configuration () # Put the PN532 back in normal mode
75
75
76
76
def _wait_ready (self , timeout = 1 ):
77
77
"""Poll PN532 if status byte is ready, up to `timeout` seconds"""
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ def _wakeup(self):
79
79
spi .write (bytearray ([0x00 ])) # pylint: disable=no-member
80
80
time .sleep (0.01 )
81
81
self .low_power = False
82
- self .SAM_configuration () # Put the PN532 back in normal mode
82
+ self .SAM_configuration () # Put the PN532 back in normal mode
83
83
84
84
def _wait_ready (self , timeout = 1 ):
85
85
"""Poll PN532 if status byte is ready, up to `timeout` seconds"""
Original file line number Diff line number Diff line change @@ -61,15 +61,15 @@ def _wakeup(self):
61
61
self .low_power = False
62
62
self ._uart .write (
63
63
b"\x55 \x55 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 "
64
- ) # wake up!
64
+ ) # wake up!
65
65
self .SAM_configuration ()
66
66
67
67
def _wait_ready (self , timeout = 1 ):
68
68
"""Wait `timeout` seconds"""
69
69
timestamp = time .monotonic ()
70
70
while (time .monotonic () - timestamp ) < timeout :
71
71
if self ._uart .in_waiting > 0 :
72
- return True # No Longer Busy
72
+ return True # No Longer Busy
73
73
time .sleep (0.01 ) # lets ask again soon!
74
74
# Timed out!
75
75
return False
You can’t perform that action at this time.
0 commit comments