Introduce new Cargo features generated with cube-parse #82
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 introduces four new
io-*
features that can be used todifferentiate between different GPIO peripheral versions. This is
required to properly implement pin mappings for I/O pins (including
Serial, I²C, SPI, etc). See #74 (comment) for more context.
Additionally, because the GPIO peripheral version don't map cleanly to
the previously used families (stm32l0x1, stm32l0x2, stm32l0x3), I added
aliases for every MCU in the STM32L0 family. Those
mcu-*
featuresare purely used as aliases
and thus do not need to be included in the testing matrix. The features
are provided as a shortcut to the user, so that the different HAL
parameters (like GPIO peripheral version, MCU subfamily, chip package,
etc) do not need to be determined manually. MCU features should
never be used as cfg gates in the source code.
Since the HAL already uses chip packages as features (in the ADC
module), I also added a dependency from the MCU feature to the
corresponding chip package feature. I am not sure whether
using physical chip package as a selector is a good idea, but since
that's already the status quo I simply kept them.
All features are generated using https://github.com/dbrgn/cube-parse:
This PR is a requirement to resolve #68 and #76.
CC @adamgreig @HarkonenBade @jonas-schievink @david-sawatzke @arkorobotics @rnestler