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

Machine clean & docs update #99

Merged
merged 2 commits into from
Oct 17, 2023
Merged

Conversation

jaenrig-ifx
Copy link
Member

@jaenrig-ifx jaenrig-ifx commented Oct 13, 2023

By creating this pull request you agree to the terms in CONTRIBUTING.md.
https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md
--- DO NOT DELETE ANYTHING ABOVE THIS LINE ---

CONTRIBUTING.md also tells you what to expect in the PR process.

To review after #98.

  • Some cleanup from machine_pin to machine_pin_phy refactor
  • Adopted docs to constructor changes in Pin related classes. Pin.drive and Pin.alt are not implemented. SPI, I2C, PWM require as mandatory the pins of their lines. There are no default pins anymore, as there is no documented default instances, and now we are supporting multiple boards.

Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
@@ -411,8 +412,17 @@ MISO P9_1 P6_1 P10_1
SCK P9_2 P6_2 P10_2
===== =========== ============ ============

..

TODO: This is only applicable to the CY8CPROTO-062-4343W. This does not belong here.
Copy link
Member

Choose a reason for hiding this comment

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

I agree this is specific to only proto board. But also, in mpy official docs other ports which support multiple boards still have I guess the most common board reference (pinouts etc.) in quickref. But we will have to move around our docs a bit. Maybe have common port docs and point out to getting started with different boards or something.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree, other ports show only one board. We have to discuss this in the strategy, and find our compromise for maintainability - user friendliness.

@@ -425,7 +435,7 @@ SPI object is created with default settings or settings of previous initializati
::

from machine import SPI
spi = SPI(0) # Default assignment: id=0, sck=P9_2 ,MOSI=P9_0, MISO=P9_1, baudrate=1000000, Polarity=0, Phase=0, bits=8, firstbit=SPI.MSB
spi = SPI(0, sck='P11_2', mosi='P11_0', miso='P11_1') # Default assignment: id=0, sck=P9_2 ,MOSI=P9_0, MISO=P9_1

Choose a reason for hiding this comment

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

Here pins and comment is mismatched. I think it should be
spi = SPI(0, sck='P9_2', mosi='P9_0', miso='P9_1') # Default assignment: id=0, baudrate=1000000, Polarity=0, Phase=0, bits=8, firstbit=SPI.MSB

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup. Let me fix it!

Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
@jaenrig-ifx jaenrig-ifx merged commit 189c4a5 into machine_spi_deinit Oct 17, 2023
22 of 24 checks passed
@jaenrig-ifx jaenrig-ifx deleted the machine_clean_docs branch October 17, 2023 11:39
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