aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-nrf')
-rw-r--r--embassy-nrf/CHANGELOG.md1
-rw-r--r--embassy-nrf/src/spis.rs15
2 files changed, 16 insertions, 0 deletions
diff --git a/embassy-nrf/CHANGELOG.md b/embassy-nrf/CHANGELOG.md
index be79bde5d..cfb040ef5 100644
--- a/embassy-nrf/CHANGELOG.md
+++ b/embassy-nrf/CHANGELOG.md
@@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
28- changed: `gpiote::InputChannel::wait()` now ensures events are seen as soon as the function is called, even if the future is not polled 28- changed: `gpiote::InputChannel::wait()` now ensures events are seen as soon as the function is called, even if the future is not polled
29- bugfix: use correct flash size for nRF54l 29- bugfix: use correct flash size for nRF54l
30- changed: add workaround for anomaly 66 on nrf52 30- changed: add workaround for anomaly 66 on nrf52
31- added: expose PPI events available on SPIS peripheral
31 32
32## 0.8.0 - 2025-09-30 33## 0.8.0 - 2025-09-30
33 34
diff --git a/embassy-nrf/src/spis.rs b/embassy-nrf/src/spis.rs
index 96a9c0ae0..6f837c317 100644
--- a/embassy-nrf/src/spis.rs
+++ b/embassy-nrf/src/spis.rs
@@ -17,6 +17,7 @@ use crate::gpio::{self, AnyPin, OutputDrive, Pin as GpioPin, SealedPin as _, con
17use crate::interrupt::typelevel::Interrupt; 17use crate::interrupt::typelevel::Interrupt;
18use crate::pac::gpio::vals as gpiovals; 18use crate::pac::gpio::vals as gpiovals;
19use crate::pac::spis::vals; 19use crate::pac::spis::vals;
20use crate::ppi::Event;
20use crate::util::slice_in_ram_or; 21use crate::util::slice_in_ram_or;
21use crate::{interrupt, pac}; 22use crate::{interrupt, pac};
22 23
@@ -334,6 +335,20 @@ impl<'d> Spis<'d> {
334 Ok((n_rx, n_tx)) 335 Ok((n_rx, n_tx))
335 } 336 }
336 337
338 /// Returns the ACQUIRED event, for use with PPI.
339 ///
340 /// This event will fire when the semaphore is acquired.
341 pub fn event_acquired(&self) -> Event<'d> {
342 Event::from_reg(self.r.events_acquired())
343 }
344
345 /// Returns the END event, for use with PPI.
346 ///
347 /// This event will fire when the slave transaction is complete.
348 pub fn event_end(&self) -> Event<'d> {
349 Event::from_reg(self.r.events_end())
350 }
351
337 async fn async_inner(&mut self, rx: &mut [u8], tx: &[u8]) -> Result<(usize, usize), Error> { 352 async fn async_inner(&mut self, rx: &mut [u8], tx: &[u8]) -> Result<(usize, usize), Error> {
338 match self.async_inner_from_ram(rx, tx).await { 353 match self.async_inner_from_ram(rx, tx).await {
339 Ok(n) => Ok(n), 354 Ok(n) => Ok(n),