-
Notifications
You must be signed in to change notification settings - Fork 3k
gpio_api.h: Clarify desired behaviour for NC #10489
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
Conversation
@kjbracey-arm, thank you for your changes. |
Updated description looks good. How many targets follow this? As stated, test would be good and have target code updated to this. Will this be few steps update? This would be good to target for 5.13 (considering all targets will require update). |
Most, but not all, implement it. As So I would say this and target updates and test should go for patch release. I can look at tests and target updates later this week. |
Created a test, and waiting for its results, but by inspection, ARM SSG/FM, Atmel, RTL8195A, EFM32, TT, Wiznet and Ublox HI2110 do not handle NC as specified here. The rest do. (It's worth noting that gpio_irq_api does not incorporate this behaviour, and does not have a I've got commits for a test + changing targets (https://github.com/kjbracey-arm/mbed-os/commits/gpio_api_nc_test). Can incorporate those into this PR, or as one or more follow-ups. |
👍 Lets add it here. |
It would probably be worth adding tests for the ability to initialise NC pins and check `is_connected`. Some platforms are assert failing the init, and can't be 100% sure `is_connected` is working on those platforms either.
Added the extra commits for testing and correcting NC handling on platforms (other than EFM32 covered by #10482). |
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.
just SPDX identifier, LGTM otherwise
Check two items of defined behaviour - that you can initialise a gpio_t with NC, and you can detect that state with gpio_is_connected().
Should get reviews from each of the vendors though - not least for confirmation I haven't broken anything. (Not all of those are in CI, and I don't have them). |
@ThunderSoft123 @ARMmbed/team-wiznet @ARMmbed/team-realtek @jamesbeyond Please review gpio files for your targets changed here |
We would like to proceed with this pull request, please review |
I started CI job meanwhile |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
@maclobdell @MarceloSalazar could you help get this reviewed by partners please ? |
@0xc0170 No problem with revision. |
Description
Documentation clarified, and platforms that don't conform brought into line. Simple test added.
Clarification needed as shown by #7862, #10191, #9469 and #10482.
Pull request type