-
Notifications
You must be signed in to change notification settings - Fork 774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STM32-TSC: enable discriminating between pins within same TSC group and improve TSC library in general #3274
base: main
Are you sure you want to change the base?
Conversation
1a5fb2a
to
7d93a02
Compare
7d93a02
to
f6384d3
Compare
12d1e7d
to
fba76f4
Compare
@Eekle, @kkoppul2, @beastbytes I've made significant updates to the TSC driver that you've previously contributed to and might still have interest in. While you may not have approval rights for this repo, I'd appreciate any insights you might have. |
The small additions I made the TSC driver are pretty much my greatest contribution to embassy :P So I don't really feel I can offer you much insight, unfortunately. But thank you for working on this peripheral, and good luck! |
fba76f4
to
c7742e7
Compare
bender run |
Is anything preventing this PR from being merged? I'd be glad to help if needed! |
From my point of view its ready :) |
I've been trying this PR and it's great. Thanks! I do have some feedback regarding naming : it's a bit inconsistent regarding the use of a tsc::Group;
tsc::pin_groups::PinGroup;
tsc::pin_groups::G1IO1Pin; But some elements repeat a tsc::tsc_io_pin::TscIOPin;
tsc::TscAcquisitionBankReadings;
tsc::TscAcquisitionBank;
tsc::TscAcquisitionBankStatus; I think it'd be better to ditch all the prefixes and rely exclusively on namespacing. This would yield: tsc::Group;
tsc::pin_groups::PinGroup;
tsc::pin_groups::G1IO1Pin;
tsc::io_pin::IOPin;
tsc::AcquisitionBankReadings;
tsc::AcquisitionBank;
tsc::AcquisitionBankStatus; (Note that this is not an exhaustive list). |
I also have a question regarding the use of |
…nd improve TSC library in general
…sing the async pending method
0a6461a
to
f8fd757
Compare
@Ecco Thanks for the feedback! I've made the following changes:
I've rebased with latest main and pushed the updates as separate commits. |
Hi first of all thanks for this PR, I have tried the f3 blocking example with a stm32f303k8 and confirm that it works! Now I'm trying to transfer the multipin example from stm32l4 to the f3. I noticed in the description of the example that the set_active_channels() method is mentioned here, but set_active_channels_mask() is used in the code, is there a reason for this? |
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