aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src
diff options
context:
space:
mode:
authorKarun <[email protected]>2024-04-22 12:40:08 -0400
committerKarun <[email protected]>2024-05-02 17:17:39 -0400
commit4bf2178de700e9a03aebcf161f36e2e36fb0581f (patch)
treef0c0a9eb6e80b97612845e5ed6c23fa15210bae1 /embassy-stm32/src
parent253f6c42eeada0bc9e40582fd968214d8f8bd761 (diff)
remove remaining warnings
Diffstat (limited to 'embassy-stm32/src')
-rw-r--r--embassy-stm32/src/tsc/mod.rs35
1 files changed, 18 insertions, 17 deletions
diff --git a/embassy-stm32/src/tsc/mod.rs b/embassy-stm32/src/tsc/mod.rs
index 8642da0e1..ad0f1cca0 100644
--- a/embassy-stm32/src/tsc/mod.rs
+++ b/embassy-stm32/src/tsc/mod.rs
@@ -5,13 +5,13 @@
5/// Enums defined for peripheral parameters 5/// Enums defined for peripheral parameters
6pub mod enums; 6pub mod enums;
7 7
8use embassy_hal_internal::{into_ref, PeripheralRef};
8pub use enums::*; 9pub use enums::*;
9 10
10use crate::gpio::{AFType, AnyPin, Pull}; 11use crate::gpio::{AFType, AnyPin, Pull};
11use crate::pac::tsc::Tsc as Regs; 12use crate::pac::tsc::Tsc as Regs;
12use crate::rcc::RccPeripheral; 13use crate::rcc::RccPeripheral;
13use crate::{peripherals, Peripheral}; 14use crate::{peripherals, Peripheral};
14use embassy_hal_internal::{into_ref, PeripheralRef};
15 15
16const TSC_NUM_GROUPS: u32 = 8; 16const TSC_NUM_GROUPS: u32 = 8;
17 17
@@ -148,6 +148,7 @@ impl Default for Config {
148 148
149/// Pin struct that maintains usage 149/// Pin struct that maintains usage
150#[allow(missing_docs)] 150#[allow(missing_docs)]
151#[allow(dead_code)]
151pub struct TscPin<'d, T> { 152pub struct TscPin<'d, T> {
152 pin: PeripheralRef<'d, T>, 153 pin: PeripheralRef<'d, T>,
153 role: PinType, 154 role: PinType,
@@ -174,16 +175,16 @@ pub struct PinGroup<'d, A> {
174/// TSC driver 175/// TSC driver
175pub struct Tsc<'d, T: Instance> { 176pub struct Tsc<'d, T: Instance> {
176 _peri: PeripheralRef<'d, T>, 177 _peri: PeripheralRef<'d, T>,
177 g1: Option<PinGroup<'d, AnyPin>>, 178 _g1: Option<PinGroup<'d, AnyPin>>,
178 g2: Option<PinGroup<'d, AnyPin>>, 179 _g2: Option<PinGroup<'d, AnyPin>>,
179 g3: Option<PinGroup<'d, AnyPin>>, 180 _g3: Option<PinGroup<'d, AnyPin>>,
180 g4: Option<PinGroup<'d, AnyPin>>, 181 _g4: Option<PinGroup<'d, AnyPin>>,
181 g5: Option<PinGroup<'d, AnyPin>>, 182 _g5: Option<PinGroup<'d, AnyPin>>,
182 g6: Option<PinGroup<'d, AnyPin>>, 183 _g6: Option<PinGroup<'d, AnyPin>>,
183 #[cfg(any(tsc_v2, tsc_v3))] 184 #[cfg(any(tsc_v2, tsc_v3))]
184 g7: Option<PinGroup<'d, AnyPin>>, 185 _g7: Option<PinGroup<'d, AnyPin>>,
185 #[cfg(tsc_v3)] 186 #[cfg(tsc_v3)]
186 g8: Option<PinGroup<'d, AnyPin>>, 187 _g8: Option<PinGroup<'d, AnyPin>>,
187 state: State, 188 state: State,
188 config: Config, 189 config: Config,
189} 190}
@@ -425,16 +426,16 @@ impl<'d, T: Instance> Tsc<'d, T> {
425 426
426 Self { 427 Self {
427 _peri: peri, 428 _peri: peri,
428 g1, 429 _g1: g1,
429 g2, 430 _g2: g2,
430 g3, 431 _g3: g3,
431 g4, 432 _g4: g4,
432 g5, 433 _g5: g5,
433 g6, 434 _g6: g6,
434 #[cfg(any(tsc_v2, tsc_v3))] 435 #[cfg(any(tsc_v2, tsc_v3))]
435 g7, 436 _g7: g7,
436 #[cfg(tsc_v3)] 437 #[cfg(tsc_v3)]
437 g8, 438 _g8: g8,
438 state: State::Ready, 439 state: State::Ready,
439 config, 440 config,
440 } 441 }