gatts/sd: [WIP] allow placing attribute values in user RAM #105
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.
This PR targets issue #104
This PR is Work in Progress: still need to find a platform-compatible way of determining
whether an attribute value must be located in stack or in user RAM for SoftDevice targets.
Currently, the algorithm works this way: if a characteristics' config
has an attribute value with length greater than zero, the value is set
to be placed in user RAM; otherwise, in stack.
This is a breaking change, since previous software written with non-zero
lengths attrib. values will not be aware that using user RAM instead of
the stack forces them to lock that RAM, i.e., the memory must be reserved
for the lifetime of the attribute. There should be an option for specifying
what attribute will go to RAM and what will go to stack, defaulting to stack,
but introducing new members in the CharacteristicsConfig struct will make
the source incompatible with targets other than SoftDevice.