-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Make gpio irq api portable #15190
Make gpio irq api portable #15190
Conversation
@hazzlim, thank you for your changes. |
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.
Non regression tests OK with all STM32 families
Ci started |
Maybe worth holding off merging before review from @ARMmbed/mbed-os-hal (?) |
Jenkins CI Test : ❌ FAILEDBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
I just wanted to give it a first go with CI if it finds anything. It failed (one target gpio test timeout) |
37491e5
to
fccedda
Compare
I've re-run the failed test and it passed, looks like it was an issue with connecting to the board rather than with the changes. Oddly though, looks like on the original CI run the test in question ( |
CI restarted |
Jenkins CI Test : ❌ FAILEDBuild Number: 4 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Sorry, there's new targets added since I originally opened this which need updating as well. Will update. |
The HAL gpio_irq_api stores object IDs, which serve as a form of context for the dispatch of the interrupt handler in the drivers level InterruptIn Class. The way this is achieved is that the InterruptIn Class casts its address to uint32_t, which is stored as the ID. This results in compilation failure when the size of an object pointer is greater than uint32_t, for example when building on a PC for unit testing. In order to allow Unit Testing of the InterruptIn Class, we replace the use of uint32_t with uintptr_t (type capable of holding a pointer), which allows portability and expresses intentions more clearly. In aid of this latter goal, we also replace the use of the name "id" with "context", to improve clarity - these are addresses of the context related to that callback.
fccedda
to
f4e5359
Compare
Have updated with changes for new target (TOSHIBA TMPM4KN). |
CI started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 5 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
This PR makes similar changes to that of #15077 for the purpose of building MbedOS drivers components for unit testing.
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers
@ARMmbed/mbed-os-core @ARMmbed/mbed-os-hal