-
Notifications
You must be signed in to change notification settings - Fork 21
Peer Manager typedef removal and some refactoring #438
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
Open
anhmolt
wants to merge
27
commits into
nrfconnect:main
Choose a base branch
from
anhmolt:pm-refactoring
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Peer manager API was earlier aligned to having const keyword before the parameter storage type. This one slipped through. Signed-off-by: Andreas Moltumyr <[email protected]>
Having successfully deleted data is not an error. Signed-off-by: Andreas Moltumyr <[email protected]>
Using a typedef for the peer_id type does not really improve readability or give anything. Replace with the actual storage type. Signed-off-by: Andreas Moltumyr <[email protected]>
Using a typedef for the store token does not really improve readability or give anything. Replace with the actual storage type. Signed-off-by: Andreas Moltumyr <[email protected]>
Using a typedef for the security error does not really improve readability or give anything. Replace with the actual storage type. Signed-off-by: Andreas Moltumyr <[email protected]>
Change ble_gatt_db_srv_t -> struct ble_gatt_db_srv ble_gatt_db_char_t -> struct ble_gatt_db_char to align with NCS code style. Signed-off-by: Andreas Moltumyr <[email protected]>
Change pm_peer_id_list_skip_t to enum pm_peer_id_list_skip to align with NCS code style. Signed-off-by: Andreas Moltumyr <[email protected]>
Change pm_peer_data_id_t to enum pm_peer_data_id to align with NCS code style. Signed-off-by: Andreas Moltumyr <[email protected]>
Change pm_conn_sec_procedure_t to enum pm_conn_sec_procedure to align with NCS code style. Signed-off-by: Andreas Moltumyr <[email protected]>
Change pm_conn_sec_config_t to struct pm_conn_sec_config to align with NCS code style. Signed-off-by: Andreas Moltumyr <[email protected]>
Change pm_peer_data_bonding_t to struct pm_peer_data_bonding to align with NCS code style. Signed-off-by: Andreas Moltumyr <[email protected]>
Change pm_peer_data_local_gatt_db_t to struct pm_peer_data_local_gatt_db to align with NCS code style. Signed-off-by: Andreas Moltumyr <[email protected]>
Remove typedef pm_privacy_params_t and use ble_gap_privacy_params_t directly in the peer_manager API. Docstrings for pm_privacy_params_t is exactly the same as that of ble_gap_privacy_params_t in the SoftDevice API. Signed-off-by: Andreas Moltumyr <[email protected]>
Change pm_conn_sec_status_t to struct pm_conn_sec_status to align with NCS code style. Signed-off-by: Andreas Moltumyr <[email protected]>
Change pm_evt_id_t to enum pm_evt_id to align with NCS code style. Signed-off-by: Andreas Moltumyr <[email protected]>
Remove typedefs for the params of pm_evt_t to align with NCS code style. Signed-off-by: Andreas Moltumyr <[email protected]>
Change pm_evt_t to struct pm_evt to align with NCS code style and cleanup some code populating said event structure with initializer array. Signed-off-by: Andreas Moltumyr <[email protected]>
Remove typedefs for structs and enums internally in peer_manager to align with NCS code style. Signed-off-by: Andreas Moltumyr <[email protected]>
Place const keyword before the storage type to align with the style for the repo. Signed-off-by: Andreas Moltumyr <[email protected]>
Remove three helper functions by using the atomic API directly in the other functions. Signed-off-by: Andreas Moltumyr <[email protected]>
The verification macros in sdk_macros.h was copied from nRF5 SDK to support quicker porting of the peer_manager and was never intended to persist long in nRF Bare Metal option. This removes the sdk_macros.h header file and substitutes the logic where the VERIFY_xxx macros were used. This preserves the logic. Signed-off-by: Andreas Moltumyr <[email protected]>
When enabling the debug checks (asserts), a value of zero for wlist_addr_cnt triggers an assert in the peers_id_keys_get() function. Correct it to the number of addresses that can be held in the local addrs array passed to the peers_id_keys_get() function. For context, on return from peers_id_keys_get(), the wlist_addr_cnt will hold the number of addresses written to the addrs array. Signed-off-by: Andreas Moltumyr <[email protected]>
Use of macro NRF_PM_DEBUG_CHECK is from nRF5 SDK and was never intended to be kept for long. Remove the NRF_PM_DEBUG_CHECK debug check macro and use the zephyr asserts module inplace of it. Signed-off-by: Andreas Moltumyr <[email protected]>
Cleanup some header includes in peer_manager internal headers. Signed-off-by: Andreas Moltumyr <[email protected]>
Fix code that is only compiled when CONFIG_PM_HANDLER_SEC_DELAY_MS > 0. Fixes an assert, a missing "address of" symbol and adds a void type cast for the error passed to APP_ERROR_CHECK macro to silence a warning. Signed-off-by: Andreas Moltumyr <[email protected]>
* Rename function _conn_secure to conn_secure_impl to avoid having a function starting with an underscore. * Comment that the context pointer for the delay timer holds the data itself and does not hold a valid address. * Place the CONFIG_PM_HANDLER_SEC_DELAY_MS preprocessor conditional inside of the conn_secure function so there exists only one signature for the function. Signed-off-by: Andreas Moltumyr <[email protected]>
Remove hungarian notation, that is p_ and m_ from internal peer_manager files. Signed-off-by: Andreas Moltumyr <[email protected]>
You can find the documentation preview for this PR here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
changelog-entry-required
Update changelog before merge. Remove label if entry is not needed or already added.
doc-required
PR must not be merged without tech writer approval.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Typedef removal from PM API and internal. Plus some refactoring.