diff options
| author | Siarhei B <[email protected]> | 2025-11-21 00:10:56 +0100 |
|---|---|---|
| committer | Siarhei B <[email protected]> | 2025-11-21 00:10:56 +0100 |
| commit | c646d589afc905020700376144da1dd1398287fc (patch) | |
| tree | a89ad4ebf4a53a0d4b806b31930ee1f6ee76fbc1 /embassy-mspm0/src | |
| parent | 5539288b9e591ff0aa8d91d635bfd7f009d24cb1 (diff) | |
mspm0-mathacl: add non-generic phantomdata
Diffstat (limited to 'embassy-mspm0/src')
| -rw-r--r-- | embassy-mspm0/src/mathacl.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/embassy-mspm0/src/mathacl.rs b/embassy-mspm0/src/mathacl.rs index 78646c90f..e29f4a59e 100644 --- a/embassy-mspm0/src/mathacl.rs +++ b/embassy-mspm0/src/mathacl.rs | |||
| @@ -28,15 +28,14 @@ pub enum Error { | |||
| 28 | NBitsTooBig, | 28 | NBitsTooBig, |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | pub struct Mathacl<'d, T: Instance> { | 31 | pub struct Mathacl<'d> { |
| 32 | _peri: Peri<'d, T>, | ||
| 33 | regs: &'static Regs, | 32 | regs: &'static Regs, |
| 34 | _phantom: PhantomData<T>, | 33 | _phantom: PhantomData<&'d mut ()>, |
| 35 | } | 34 | } |
| 36 | 35 | ||
| 37 | impl<'d, T: Instance> Mathacl<'d, T> { | 36 | impl<'d> Mathacl<'d> { |
| 38 | /// Mathacl initialization. | 37 | /// Mathacl initialization. |
| 39 | pub fn new(instance: Peri<'d, T>) -> Self { | 38 | pub fn new<T: Instance>(_instance: Peri<'d, T>) -> Self { |
| 40 | // Init power | 39 | // Init power |
| 41 | T::regs().gprcm(0).rstctl().write(|w| { | 40 | T::regs().gprcm(0).rstctl().write(|w| { |
| 42 | w.set_resetstkyclr(vals::Resetstkyclr::CLR); | 41 | w.set_resetstkyclr(vals::Resetstkyclr::CLR); |
| @@ -54,7 +53,6 @@ impl<'d, T: Instance> Mathacl<'d, T> { | |||
| 54 | cortex_m::asm::delay(16); | 53 | cortex_m::asm::delay(16); |
| 55 | 54 | ||
| 56 | Self { | 55 | Self { |
| 57 | _peri: instance, | ||
| 58 | regs: T::regs(), | 56 | regs: T::regs(), |
| 59 | _phantom: PhantomData, | 57 | _phantom: PhantomData, |
| 60 | } | 58 | } |
