aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src/twis.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-nrf/src/twis.rs')
-rw-r--r--embassy-nrf/src/twis.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/embassy-nrf/src/twis.rs b/embassy-nrf/src/twis.rs
index 752a8c046..a115d5616 100644
--- a/embassy-nrf/src/twis.rs
+++ b/embassy-nrf/src/twis.rs
@@ -15,9 +15,9 @@ use embassy_time::{Duration, Instant};
15 15
16use crate::chip::{EASY_DMA_SIZE, FORCE_COPY_BUFFER_SIZE}; 16use crate::chip::{EASY_DMA_SIZE, FORCE_COPY_BUFFER_SIZE};
17use crate::gpio::Pin as GpioPin; 17use crate::gpio::Pin as GpioPin;
18use crate::interrupt::{self, Interrupt}; 18use crate::interrupt::typelevel::Interrupt;
19use crate::util::slice_in_ram_or; 19use crate::util::slice_in_ram_or;
20use crate::{gpio, pac, Peripheral}; 20use crate::{gpio, interrupt, pac, Peripheral};
21 21
22/// TWIS config. 22/// TWIS config.
23#[non_exhaustive] 23#[non_exhaustive]
@@ -114,7 +114,7 @@ pub struct InterruptHandler<T: Instance> {
114 _phantom: PhantomData<T>, 114 _phantom: PhantomData<T>,
115} 115}
116 116
117impl<T: Instance> interrupt::Handler<T::Interrupt> for InterruptHandler<T> { 117impl<T: Instance> interrupt::typelevel::Handler<T::Interrupt> for InterruptHandler<T> {
118 unsafe fn on_interrupt() { 118 unsafe fn on_interrupt() {
119 let r = T::regs(); 119 let r = T::regs();
120 let s = T::state(); 120 let s = T::state();
@@ -143,7 +143,7 @@ impl<'d, T: Instance> Twis<'d, T> {
143 /// Create a new TWIS driver. 143 /// Create a new TWIS driver.
144 pub fn new( 144 pub fn new(
145 twis: impl Peripheral<P = T> + 'd, 145 twis: impl Peripheral<P = T> + 'd,
146 _irq: impl interrupt::Binding<T::Interrupt, InterruptHandler<T>> + 'd, 146 _irq: impl interrupt::typelevel::Binding<T::Interrupt, InterruptHandler<T>> + 'd,
147 sda: impl Peripheral<P = impl GpioPin> + 'd, 147 sda: impl Peripheral<P = impl GpioPin> + 'd,
148 scl: impl Peripheral<P = impl GpioPin> + 'd, 148 scl: impl Peripheral<P = impl GpioPin> + 'd,
149 config: Config, 149 config: Config,
@@ -778,7 +778,7 @@ pub(crate) mod sealed {
778/// TWIS peripheral instance. 778/// TWIS peripheral instance.
779pub trait Instance: Peripheral<P = Self> + sealed::Instance + 'static { 779pub trait Instance: Peripheral<P = Self> + sealed::Instance + 'static {
780 /// Interrupt for this peripheral. 780 /// Interrupt for this peripheral.
781 type Interrupt: Interrupt; 781 type Interrupt: interrupt::typelevel::Interrupt;
782} 782}
783 783
784macro_rules! impl_twis { 784macro_rules! impl_twis {
@@ -793,7 +793,7 @@ macro_rules! impl_twis {
793 } 793 }
794 } 794 }
795 impl crate::twis::Instance for peripherals::$type { 795 impl crate::twis::Instance for peripherals::$type {
796 type Interrupt = crate::interrupt::$irq; 796 type Interrupt = crate::interrupt::typelevel::$irq;
797 } 797 }
798 }; 798 };
799} 799}