diff options
| author | michel <[email protected]> | 2024-11-22 16:48:18 +0100 |
|---|---|---|
| committer | michel <[email protected]> | 2024-11-29 17:58:35 +0100 |
| commit | efbe7fb8e8ac77eaad2787bb0ea981b1e0f875c0 (patch) | |
| tree | b39c30e8de7d9eb67ee74d6bdcc7670cdf46d8d1 /examples/stm32l4/src/bin | |
| parent | 31da5155e840d97e432cf2fa06c6fa4c2a19bf9a (diff) | |
stm32 tsc examples: minor corrections
Diffstat (limited to 'examples/stm32l4/src/bin')
| -rw-r--r-- | examples/stm32l4/src/bin/tsc_multipin.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32l4/src/bin/tsc_multipin.rs b/examples/stm32l4/src/bin/tsc_multipin.rs index 2fadbe16a..8fec5ddc4 100644 --- a/examples/stm32l4/src/bin/tsc_multipin.rs +++ b/examples/stm32l4/src/bin/tsc_multipin.rs | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | // ## This example demonstrates how to: | 12 | // ## This example demonstrates how to: |
| 13 | // | 13 | // |
| 14 | // 1. Configure multiple channel pins within a single TSC group | 14 | // 1. Configure multiple channel pins within a single TSC group |
| 15 | // 2. Use the set_active_channels method to switch between different channels | 15 | // 2. Use the set_active_channels_bank method to switch between sets of different channels (acquisition banks) |
| 16 | // 3. Read and interpret touch values from multiple channels in the same group | 16 | // 3. Read and interpret touch values from multiple channels in the same group |
| 17 | // | 17 | // |
| 18 | // ## Suggested physical setup on STM32L4R5ZI-P board: | 18 | // ## Suggested physical setup on STM32L4R5ZI-P board: |
| @@ -76,7 +76,7 @@ async fn acquire_sensors( | |||
| 76 | touch_controller: &mut Tsc<'static, peripherals::TSC, mode::Async>, | 76 | touch_controller: &mut Tsc<'static, peripherals::TSC, mode::Async>, |
| 77 | tsc_acquisition_bank: &AcquisitionBank, | 77 | tsc_acquisition_bank: &AcquisitionBank, |
| 78 | ) { | 78 | ) { |
| 79 | touch_controller.set_active_channels_mask(tsc_acquisition_bank.mask()); | 79 | touch_controller.set_active_channels_bank(tsc_acquisition_bank); |
| 80 | touch_controller.start(); | 80 | touch_controller.start(); |
| 81 | touch_controller.pend_for_acquisition().await; | 81 | touch_controller.pend_for_acquisition().await; |
| 82 | touch_controller.discharge_io(true); | 82 | touch_controller.discharge_io(true); |
