Update I2C pin mappings based on STM32L0xx GPIO IP #87
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 GPIO internal peripheral (IP) does not match the stm32l0x/stm32l0x2/stm32l0x3 grouping used in the PACs. Instead, there are 4 different GPIO IPs in the STM32L0 family that define how the pin functions are mapped to the actual pins. This means that the current I2C mappings are broken for a lot of MCUs. For reference, these issues have already been opened because the mappings were broken:
We can use the
io-*
Cargo features to differentiate between these mappings. This requires that the properio-*
feature is set when compiling (and is thus a breaking change). The easiest way to apply the feature without looking at the STM32CubeMX database XML files is to simply use the propermcu-*
feature, for examplemcu-STM32L071KBTx
.The pin mappings used in this changeset were taken out of the cube-parse output for the STM32L0 family. The output can be found here. To re-generate:
The source files in the STM32CubeMx database used to generate the mappings:
More information on the database format can be found in the cube-parse README.
The long-term solution should probably be a universal pin mapping file generated by cube-parse, but with the current APIs this would be a major refactoring. Therefore a manual fix must suffice for now.
Fixes #76, fixes #77, fixes #85.
CC @rnestler @DanSGiesbrecht @ijager