STM32-TSC: enable discriminating between pins within same TSC group and improve TSC library in general #3274
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.
TSC Driver Updates
Introduction
This PR significantly enhances the TSC (Touch Sensing Controller) driver to improve its functionality, usability, and support for more complex touch sensing scenarios.
Key Changes
Notable Implementation Details
TscAcquisitionBank
to manage TSC channel pin collectionsPinGroupWithRoles
andTscIOPinWithRole
for compile-time role validationset_io1
,set_io2
,set_io3
, andset_io4
methods to returnTscIOPinWithRole
PinGroups
Additional Changes
Backward Compatibility
These changes introduce breaking changes to the current TSC implementation. However, as TSC does not seem to be part of any official embassy-stm32 release yet, I suppose that this is okay.
Testing
tsc_multipin.rs
examples demonstrates the use of new acquisition banks to read multiple TSC channel pins from the same TSC group