-
Notifications
You must be signed in to change notification settings - Fork 1.3k
M/S Terminology cleanup #3034
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
M/S Terminology cleanup #3034
Conversation
Are there some commits here that were already merged? DTCM and ITCM support, etc.? Maybe do a merge from upstream and push again? |
56fcf7d
to
e0a02f8
Compare
@dhalbert check again? I think I rebased against a wrong branch due to muscle memory. |
Yes, looks good now. Re API |
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.
Mind adding a section on the renaming to the design guide here? https://github.com/adafruit/circuitpython/blob/main/docs/design_guide.rst
Thanks for kicking this off!
CIRCUITPY_I2CSECONDARY = 0 | ||
CIRCUITPY_AUDIOBUSIO = 0 | ||
CIRCUITPY_BLEIO = 0 | ||
CIRCUITPY_DISPLAYIO = 0 | ||
CIRCUITPY_GAMEPAD = 0 | ||
CIRCUITPY_I2CSLAVE = 0 | ||
CIRCUITPY_I2CSECONDARY = 0 |
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.
Want to reduce this to one definition?
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.
This looks good to me! Thank you!
Thinking about this more, I don't really like the main/secondary name for SPI. I think "host" and "device" or "peripheral" are more descriptive. (The latter matches the name SPI.) It matches our existing model for bus devices as well. We can keep the MOSI and MISO names where we have them and simply document them in host and device terms. There is a bit of weirdness around whether the code is the device or is talking to a device. The BLE apis have this challenge as well where a Characteristic can be remote or local. In some cases, I also think I know this PR is close in that it has my own approval but I think it's worth thinking hard about. Renaming long existing terminology is a big change and we should make sure we're picking the best terms. |
My preference is for the existing terminology as suggested. I've seen For |
Where? Are there examples of other hardware projects switching to it?
Why not? Main and Secondary feel like they could apply to anything.
I think we should match these in cases where the use is the same. What I'm pushing back against is the idea that these single terms should be replaced by a single terms. For example, |
I'm happy to rework this PR to reflect whatever the consensus terms are. |
I found this recently updated Microsoft docs page: https://docs.microsoft.com/en-us/uwp/api/windows.devices.spi?view=winrt-19041
If I understand the note correctly it looks like they are going with host and peripheral and their usage specifically relates to the clock signal. |
I also found a small/medium, sized project here that looks to have gone with main/secondary: noopkat/oled-js@20f7d8d |
I poked around a bit more but have not really run across any other projects that have made the move yet within the context of SPI / I2C. It seems at this point there is lots of discussion ongoing, but not a lot of actual precedent set. Personally I probably lean toward using main/secondary in order to reduce confusion with acronyms (MI, MO, MISO, and MOSI) that are printed as pin labels on some devices. However I do also agree they are somewhat vague so I am not staunchly opposed to host/peripheral or something different. |
I'm going to condense my opinion down here and say that what I really care about is not breaking acronyms that appear on silkscreens - I think it's a significant obstacle to both new users and 3rd party developers. I would weigh the accessibility of the terms over their technical precision in this case, since the exact roles of SPI devices vary a lot anyway, so my preference is for |
We could put "Main (host)" and "Secondary (peripheral)" in the docs as explanatory comments (or the other way around, depending on the actual API args, etc.) |
What if we split the name of the device roles (host / peripheral or device) and come up with a new acronyms for MOSI and MISO? "Main output, shared input" and "Main input, shared output" Those acronyms explain that the lines are an output to one device and shared inputs to others and vice versa. |
Rob_Fenwitch on Discord recommended "Main *, Selected *" which makes sense in the context of have a chip select line. |
"SPI" is an acronym for Serial Peripheral Interface, so it could be |
Ok, so we just discussed this in the weekly meeting. The conclusion is:
|
2655ae6
to
668ebe6
Compare
668ebe6
to
c31482a
Compare
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.
Please rerun make translate
to get the latest file move info in the file. Thanks for sticking this out. I think it's close.
c31482a
to
a663b3d
Compare
Thanks for the review! I especially appreciate you finding the things I just overlooked in the repeated renamings. |
This is how some of the words that have been discussed translate to spanish. main -> principal (we loose the M initial) |
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.
Thank you!
@tannewt after your merge of main the CI passed. What's left? |
I just got distracted and didn't merge. Now it needs a merge again. |
I'll rebase it and rerequest your review. |
eecc3a3
to
f380d3b
Compare
Also copy some notes from busio docstrings to bitbangio docstrings
This is an incompatible change.
This micropython code is not used in circuitpython
GitHub is still showing merge conflicts. |
f380d3b
to
66d031f
Compare
Merge conflicts resolved again, I had rebased against an older main ref by accident. |
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.
Thank you!
Thanks @deshipu. The article above points to an OSHWA resolution: https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names The essence is (qouting) New signal names:
Deprecated signal names:
Signal names unchanged:
Also |
This has been under development since April 2017. See adafruit#3034 and adafruit#6375. Signed-off-by: Damien George <[email protected]>
I think this corrects most of the M/S terminology that does not depend on upstream libs such as asf4, softdevice, etc., renaming things.
Note that there is an incompatible new name for the
i2csecondary
module and its contents, with no backwards compatibility alias. Technically, semver says that this requires a major version bump. Just sayin'.