Skip to content

samd: Three small changes. #12212

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

Closed
wants to merge 3 commits into from
Closed

Conversation

robert-hh
Copy link
Contributor

@robert-hh robert-hh commented Aug 10, 2023

Making it compatible to the other ports.

Signed-off-by: robert-hh <robert@hammelrath.com>
Enabling Pin.cpu by default only for SAMD51.
Enabling Pin.board by default for both SAMD21 and SAMD51.

Saves ~650 bytes for SAMD21.

Signed-off-by: robert-hh <robert@hammelrath.com>
- Rename make-pins-table.py to make-pins.py
- Name the input arguments --board-csv, --af-csv and --output-source.
- Use matching names for the internal symbols.

Signed-off-by: robert-hh <robert@hammelrath.com>
@robert-hh robert-hh changed the title samd: Two small changes. samd: Three small changes. Aug 13, 2023
@jimmo
Copy link
Member

jimmo commented Aug 16, 2023

I have implemented make-pins.py for SAMD (using the common boardgen library) in #12211 (including the reordering of pins.csv and some other changes).

I'm not sure we should remove Pin.cpu... or if we do we should consider doing it for all ports. The code size reduction is definitely worth considering though.

@robert-hh
Copy link
Contributor Author

I have implemented make-pins.py for SAMD

Not only that. You digged up quite a bit of the code, which was grown over time and may have needed some clean-up. I made a trial build for a SAMD51 board and noticed, that the the element name in machine_pin_obj_t is not properly assigned and more. It used to be the board pin name or '-', if no name is assigned. Now it is the CPU pin name, meaning that the function pin_name() returns the wrong value.

@robert-hh
Copy link
Contributor Author

Closing, because the changes were incorporated in PR #12211.

@robert-hh robert-hh closed this Aug 16, 2023
@robert-hh robert-hh deleted the samd_sp6 branch October 26, 2023 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants