Loading docs/wiring/nfc.html +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ background: black !important; } .pin1 .pin { .pin31 .pin { background: gray !important; } Loading poolpay/card/Pirc522CardReader.py +5 −4 Original line number Diff line number Diff line Loading @@ -2,12 +2,17 @@ from collections.abc import Callable from time import sleep from pirc522 import RFID import RPi.GPIO as GPIO from poolpay.card.CardReader import CardReader class Pirc522CardReader(CardReader): def __init__(self) -> None: # Provide 3.3V GPIO.setmode(GPIO.BOARD) GPIO.setup(31, GPIO.OUT, initial=1) # Open this on SPI1 bus, because SPI0's pins are taken by the LCD. # Technically, it might be possible to connect both LCD and Card Interface to # the same SPI0 bus (making one device=0, and the other device=1), Loading Loading @@ -48,8 +53,4 @@ class Pirc522CardReader(CardReader): self._handle_removal = handle_removal def close(self) -> None: # Always stop crypto1 when done working self._reader.stop_crypto() # Calls GPIO cleanup self._reader.cleanup() Loading
docs/wiring/nfc.html +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ background: black !important; } .pin1 .pin { .pin31 .pin { background: gray !important; } Loading
poolpay/card/Pirc522CardReader.py +5 −4 Original line number Diff line number Diff line Loading @@ -2,12 +2,17 @@ from collections.abc import Callable from time import sleep from pirc522 import RFID import RPi.GPIO as GPIO from poolpay.card.CardReader import CardReader class Pirc522CardReader(CardReader): def __init__(self) -> None: # Provide 3.3V GPIO.setmode(GPIO.BOARD) GPIO.setup(31, GPIO.OUT, initial=1) # Open this on SPI1 bus, because SPI0's pins are taken by the LCD. # Technically, it might be possible to connect both LCD and Card Interface to # the same SPI0 bus (making one device=0, and the other device=1), Loading Loading @@ -48,8 +53,4 @@ class Pirc522CardReader(CardReader): self._handle_removal = handle_removal def close(self) -> None: # Always stop crypto1 when done working self._reader.stop_crypto() # Calls GPIO cleanup self._reader.cleanup()