Skip to content

Commit 1542894

Browse files
YatekiiNoah Hüsser
authored andcommitted
Port the newly added SPIS driver
1 parent bf7cfd1 commit 1542894

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

nrf-hal-common/src/spis.rs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ use crate::pac::{
1515
SPIS0_NS as SPIS0,
1616
};
1717

18-
#[cfg(not(feature = "9160"))]
18+
#[cfg(feature = "52811")]
19+
use crate::pac::{
20+
spis1::{
21+
self as spis0, _EVENTS_ACQUIRED, _EVENTS_END, _EVENTS_ENDRX, _TASKS_ACQUIRE, _TASKS_RELEASE,
22+
},
23+
SPIS0, SPIS1,
24+
};
25+
26+
#[cfg(not(any(feature = "9160", feature = "52811")))]
1927
use crate::pac::{
2028
spis0::{self, _EVENTS_ACQUIRED, _EVENTS_END, _EVENTS_ENDRX, _TASKS_ACQUIRE, _TASKS_RELEASE},
2129
SPIS0,
@@ -598,7 +606,7 @@ mod sealed {
598606
impl Sealed for super::SPIS0 {}
599607
#[cfg(not(any(feature = "9160", feature = "52810")))]
600608
impl Sealed for super::SPIS1 {}
601-
#[cfg(not(any(feature = "9160", feature = "52810")))]
609+
#[cfg(not(any(feature = "9160", feature = "52811", feature = "52810")))]
602610
impl Sealed for super::SPIS2 {}
603611
}
604612

@@ -607,20 +615,23 @@ pub trait Instance: sealed::Sealed + Deref<Target = spis0::RegisterBlock> {
607615
}
608616

609617
impl Instance for SPIS0 {
610-
#[cfg(not(any(feature = "9160", feature = "52810")))]
618+
#[cfg(not(any(feature = "9160", feature = "52811", feature = "52810")))]
611619
const INTERRUPT: Interrupt = Interrupt::SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0;
612620
#[cfg(feature = "9160")]
613621
const INTERRUPT: Interrupt = Interrupt::UARTE0_SPIM0_SPIS0_TWIM0_TWIS0;
614-
#[cfg(feature = "52810")]
622+
#[cfg(any(feature = "52811", feature = "52810"))]
615623
const INTERRUPT: Interrupt = Interrupt::SPIM0_SPIS0_SPI0;
616624
}
617625

618626
#[cfg(not(any(feature = "9160", feature = "52810")))]
619627
impl Instance for SPIS1 {
628+
#[cfg(not(feature = "52811"))]
620629
const INTERRUPT: Interrupt = Interrupt::SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1;
630+
#[cfg(feature = "52811")]
631+
const INTERRUPT: Interrupt = Interrupt::TWIM0_TWIS0_TWI0_SPIM1_SPIS1_SPI1;
621632
}
622633

623-
#[cfg(not(any(feature = "9160", feature = "52810")))]
634+
#[cfg(not(any(feature = "9160", feature = "52811", feature = "52810")))]
624635
impl Instance for SPIS2 {
625636
const INTERRUPT: Interrupt = Interrupt::SPIM2_SPIS2_SPI2;
626637
}

0 commit comments

Comments
 (0)