diff options
| author | michel <[email protected]> | 2024-10-10 15:14:53 +0200 |
|---|---|---|
| committer | michel <[email protected]> | 2024-11-29 17:58:35 +0100 |
| commit | 31da5155e840d97e432cf2fa06c6fa4c2a19bf9a (patch) | |
| tree | 50b2745e97e0305fb06afcfdf3a649529a2d0d3a /examples/stm32l4/src/bin/tsc_blocking.rs | |
| parent | a5b34a7980edaba5d8de05c68a48972dd9239f75 (diff) | |
Refactor TSC module: Remove redundant 'Tsc' prefixes for improved naming consistency
Diffstat (limited to 'examples/stm32l4/src/bin/tsc_blocking.rs')
| -rw-r--r-- | examples/stm32l4/src/bin/tsc_blocking.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/stm32l4/src/bin/tsc_blocking.rs b/examples/stm32l4/src/bin/tsc_blocking.rs index 76aba55ba..12084f8e2 100644 --- a/examples/stm32l4/src/bin/tsc_blocking.rs +++ b/examples/stm32l4/src/bin/tsc_blocking.rs | |||
| @@ -74,9 +74,9 @@ async fn main(_spawner: embassy_executor::Spawner) { | |||
| 74 | 74 | ||
| 75 | let mut g2: PinGroupWithRoles<peripherals::TSC, G2> = PinGroupWithRoles::default(); | 75 | let mut g2: PinGroupWithRoles<peripherals::TSC, G2> = PinGroupWithRoles::default(); |
| 76 | // D25 | 76 | // D25 |
| 77 | g2.set_io1::<tsc_pin_roles::Sample>(context.PB4); | 77 | g2.set_io1::<tsc::pin_roles::Sample>(context.PB4); |
| 78 | // D21 | 78 | // D21 |
| 79 | let tsc_sensor = g2.set_io2::<tsc_pin_roles::Channel>(context.PB5); | 79 | let tsc_sensor = g2.set_io2::<tsc::pin_roles::Channel>(context.PB5); |
| 80 | 80 | ||
| 81 | let pin_groups: PinGroups<peripherals::TSC> = PinGroups { | 81 | let pin_groups: PinGroups<peripherals::TSC> = PinGroups { |
| 82 | g2: Some(g2.pin_group), | 82 | g2: Some(g2.pin_group), |
| @@ -128,7 +128,7 @@ const MAX_GROUP_STATUS_READ_ATTEMPTS: usize = 10; | |||
| 128 | // attempt to read group status and delay when still ongoing | 128 | // attempt to read group status and delay when still ongoing |
| 129 | async fn read_touch_value( | 129 | async fn read_touch_value( |
| 130 | touch_controller: &mut tsc::Tsc<'_, peripherals::TSC, mode::Blocking>, | 130 | touch_controller: &mut tsc::Tsc<'_, peripherals::TSC, mode::Blocking>, |
| 131 | sensor_pin: TscIOPin, | 131 | sensor_pin: tsc::IOPin, |
| 132 | ) -> Option<u16> { | 132 | ) -> Option<u16> { |
| 133 | for _ in 0..MAX_GROUP_STATUS_READ_ATTEMPTS { | 133 | for _ in 0..MAX_GROUP_STATUS_READ_ATTEMPTS { |
| 134 | match touch_controller.group_get_status(sensor_pin.group()) { | 134 | match touch_controller.group_get_status(sensor_pin.group()) { |
