-
Notifications
You must be signed in to change notification settings - Fork 7.7k
feat(perimgr): add function to retrieve detaching CB #11700
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
Allows to get the CB pointer for a Peripheral Manager Bus Type. It can be used to verify if it is already set and also in case the application needs to change the CB to something else and latter restore the original CB to that Bus Type.
👋 Hello SuGlider, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
Test Results 76 files 76 suites 13m 8s ⏱️ Results for commit f8e90a5. ♻️ This comment has been updated with latest results. |
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull Request Overview
This PR adds functionality to retrieve the detaching callback for a Peripheral Manager Bus Type. This allows applications to get the current callback pointer, verify if it's set, and potentially store/restore original callbacks when changing them.
- Adds
perimanGetBusDeinit()
function to retrieve current deinit callback for a bus type - Initializes all callback pointers to NULL in the
deinit_functions
array - Enables callback management for peripheral bus types
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
cores/esp32/esp32-hal-periman.h | Adds function declaration for perimanGetBusDeinit() |
cores/esp32/esp32-hal-periman.c | Implements perimanGetBusDeinit() function and initializes callback array to NULL |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
LGTM, would be nice if we can get this documented somewhere. Otherwise tbh no-one will know that this can be used.
Description of Change
Allows to get the CB pointer for a Peripheral Manager Bus Type.
It can be used to verify if it is already set and also in case the application needs to change the CB to something else and latter restore the original CB to that Bus Type.
PR also intializes all CB pinters to NULL.
Tests scenarios
ESP32 using LOG Debug information.
It is possible to see results by using a wire to ground RX0 while the pin is read.
Debug Output:
Related links
Closes #11666