-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Update pins.c for m5dial #9404
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 pins.c for m5dial #9404
Conversation
Missing SDA and SCL pins for M5Dial NFC reader
Tested on my side - compiled and working ok
Tested with my library code - also working
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure of the naming here. board.PORTA_I2C()
uses the GPIO13/15 for its SDA/SCL. But those pins are board.SDA
and board.SCL
. Normally board.I2C
would use board.SDA
and board.SCL
. But here board.I2C()
uses board.RFID_SDA
and board.RFID_SCL
.
From mpconfigboard.h
:
#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO12, .sda = &pin_GPIO11}, \
{.scl = &pin_GPIO15, .sda = &pin_GPIO13}}
Are board.RFID_SDA
and board.RFID_SCL
broken out for general use, or are they strictly internal for the RFID? If the latter, then I'd suggest board.RFID_I2C()
for them, and board.I2C()
for the Port A SDA and SCL instead.
@CDarius You did the original naming. What do you think? |
The
|
I just also realised it is used for other devices on I2C so probably naming is wrong. Sorry i was only using RFID for now so perchaps like CDarius mentioned would be better. |
@CDarius' suggestion makes sense to me, as it is consistent with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I double-checked so I'll go ahead and merge.
@dhalbert I little late but I looked at your changes and they look good to me |
Works ok thank You |
Hi All my first pull request ever :)
I just realised i miss SDA and SCL pins for M5Dial NFC reader, it is connected directly to board.I2C but in some usages having those pins will make things easier to work with busio