aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src/twim.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-nrf/src/twim.rs')
-rw-r--r--embassy-nrf/src/twim.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/embassy-nrf/src/twim.rs b/embassy-nrf/src/twim.rs
index dea398a67..2ad0d19b1 100644
--- a/embassy-nrf/src/twim.rs
+++ b/embassy-nrf/src/twim.rs
@@ -16,9 +16,9 @@ use embassy_time::{Duration, Instant};
16 16
17use crate::chip::{EASY_DMA_SIZE, FORCE_COPY_BUFFER_SIZE}; 17use crate::chip::{EASY_DMA_SIZE, FORCE_COPY_BUFFER_SIZE};
18use crate::gpio::Pin as GpioPin; 18use crate::gpio::Pin as GpioPin;
19use crate::interrupt::{self, Interrupt}; 19use crate::interrupt::typelevel::Interrupt;
20use crate::util::{slice_in_ram, slice_in_ram_or}; 20use crate::util::{slice_in_ram, slice_in_ram_or};
21use crate::{gpio, pac, Peripheral}; 21use crate::{gpio, interrupt, pac, Peripheral};
22 22
23/// TWI frequency 23/// TWI frequency
24#[derive(Clone, Copy)] 24#[derive(Clone, Copy)]
@@ -98,7 +98,7 @@ pub struct InterruptHandler<T: Instance> {
98 _phantom: PhantomData<T>, 98 _phantom: PhantomData<T>,
99} 99}
100 100
101impl<T: Instance> interrupt::Handler<T::Interrupt> for InterruptHandler<T> { 101impl<T: Instance> interrupt::typelevel::Handler<T::Interrupt> for InterruptHandler<T> {
102 unsafe fn on_interrupt() { 102 unsafe fn on_interrupt() {
103 let r = T::regs(); 103 let r = T::regs();
104 let s = T::state(); 104 let s = T::state();
@@ -123,7 +123,7 @@ impl<'d, T: Instance> Twim<'d, T> {
123 /// Create a new TWI driver. 123 /// Create a new TWI driver.
124 pub fn new( 124 pub fn new(
125 twim: impl Peripheral<P = T> + 'd, 125 twim: impl Peripheral<P = T> + 'd,
126 _irq: impl interrupt::Binding<T::Interrupt, InterruptHandler<T>> + 'd, 126 _irq: impl interrupt::typelevel::Binding<T::Interrupt, InterruptHandler<T>> + 'd,
127 sda: impl Peripheral<P = impl GpioPin> + 'd, 127 sda: impl Peripheral<P = impl GpioPin> + 'd,
128 scl: impl Peripheral<P = impl GpioPin> + 'd, 128 scl: impl Peripheral<P = impl GpioPin> + 'd,
129 config: Config, 129 config: Config,
@@ -750,7 +750,7 @@ pub(crate) mod sealed {
750/// TWIM peripheral instance. 750/// TWIM peripheral instance.
751pub trait Instance: Peripheral<P = Self> + sealed::Instance + 'static { 751pub trait Instance: Peripheral<P = Self> + sealed::Instance + 'static {
752 /// Interrupt for this peripheral. 752 /// Interrupt for this peripheral.
753 type Interrupt: Interrupt; 753 type Interrupt: interrupt::typelevel::Interrupt;
754} 754}
755 755
756macro_rules! impl_twim { 756macro_rules! impl_twim {
@@ -765,7 +765,7 @@ macro_rules! impl_twim {
765 } 765 }
766 } 766 }
767 impl crate::twim::Instance for peripherals::$type { 767 impl crate::twim::Instance for peripherals::$type {
768 type Interrupt = crate::interrupt::$irq; 768 type Interrupt = crate::interrupt::typelevel::$irq;
769 } 769 }
770 }; 770 };
771} 771}