Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to match the current SPI-Py API #85

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pelwell
Copy link

@pelwell pelwell commented Dec 20, 2019

The SPI-Py API has changed, and clients need updating to match. The patch to do so is preceded by a whitespace-only commit fixing the line endings.

Phil Elwell added 2 commits December 20, 2019 13:16
MFRC522.py is the only file with CR/LF (DOS) line endings - all
other files are LF-only (UNIX). Fix the anomaly. This is a whitespace-
only change.

Signed-off-by: Phil Elwell <[email protected]>
A change to the SPI-Py API added a device-handle parameter to the
transfer method.

Signed-off-by: Phil Elwell <[email protected]>
Copy link

@wahajmurtaza wahajmurtaza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did the same for connecting multiple devices, but later found this. Works on multiple devices and latest SPI-Py. Must be merged so others may not face Issue.
Before it to connect multiple devices, had to open SPI every time to read or write and then the code crashes saying too many devices to open as closing spi was not supported

@pdesterlich
Copy link

@wahajmurtaza how do you manage to make it work with multiple devices? i'm trying to connect 2 mfrc522 to a single raspberry (using a SDA to CE0 for the first and SDA to CE1 for the second) but i can't make the second reader work.
Do you have any sample / cabling suggestion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants