hal: Deprecate old HAL API - #4472
Open
BsAtHome wants to merge 1 commit into
Open
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The getter/setter infrastructure is in place and the next stage is to warn about any use of the old API. With this PR, the HAL header now marks the old API as deprecated, including:
hal_data_uhal_{bit,float,u32,s32,u64,s64}_tireal_thal_pin_*_new[f]()hal_pin_new()hal_param_*_new[f]()hal_param_new()hal_param_set*()hal_get_{pin,param,signal}_value_by_name()The HAL library uses
#pragma GCC diagnosticto prevent the deprecation warning from popping up when compiling the library or other when includinghal.h. Only use of the old API will result in a warning.The
HAL_XXXtype names, likeHAL_S32and others, are still valid and will be dealt with later. These are somewhat more involved to get streamlined and require breaking the API when done properly. A new (large) patch set will be prepared to move to the next stage before the next wave of PRs. In the meantime, the deprecation messages will inform users to start moving and prepare for what is coming.