diff options
| author | Maarten de Vries <[email protected]> | 2025-10-28 10:10:39 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-10-28 10:10:39 +0100 |
| commit | f1476ad7f21e73d3d5c015c261f9ee8b43cbd9a1 (patch) | |
| tree | f778924f0f9c7f8abd45f11ced220206cf2ce344 /embassy-nrf | |
| parent | 369959e654d095d0e3d95597693bd64fcdb50ec5 (diff) | |
| parent | 05663c231ebd82af0491dfb9d418fd0566cb02ff (diff) | |
Merge branch 'main' into nrf-simplepwm-config
Diffstat (limited to 'embassy-nrf')
| -rw-r--r-- | embassy-nrf/CHANGELOG.md | 2 | ||||
| -rw-r--r-- | embassy-nrf/src/gpiote.rs | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/embassy-nrf/CHANGELOG.md b/embassy-nrf/CHANGELOG.md index 8ce484646..89adaf2da 100644 --- a/embassy-nrf/CHANGELOG.md +++ b/embassy-nrf/CHANGELOG.md | |||
| @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 11 | - added: Add basic RTC support for nRF54L | 11 | - added: Add basic RTC support for nRF54L |
| 12 | - changed: apply trimming values from FICR.TRIMCNF on nrf53/54l | 12 | - changed: apply trimming values from FICR.TRIMCNF on nrf53/54l |
| 13 | - changed: do not panic on BufferedUarte overrun | 13 | - changed: do not panic on BufferedUarte overrun |
| 14 | - added: allow direct access to the input pin of `gpiote::InputChannel` | ||
| 15 | - bugfix: use DETECTMODE_SEC in GPIOTE in secure mode | ||
| 14 | - added: allow configuring the idle state of GPIO pins connected to PWM channels | 16 | - added: allow configuring the idle state of GPIO pins connected to PWM channels |
| 15 | - changed: allow configuring the PWM peripheral in the constructor of `SimplePwm` | 17 | - changed: allow configuring the PWM peripheral in the constructor of `SimplePwm` |
| 16 | - changed: support setting duty cycles with inverted polarity in `SimplePwm` | 18 | - changed: support setting duty cycles with inverted polarity in `SimplePwm` |
diff --git a/embassy-nrf/src/gpiote.rs b/embassy-nrf/src/gpiote.rs index a490d5b60..3658657c0 100644 --- a/embassy-nrf/src/gpiote.rs +++ b/embassy-nrf/src/gpiote.rs | |||
| @@ -77,6 +77,9 @@ pub(crate) fn init(irq_prio: crate::interrupt::Priority) { | |||
| 77 | 77 | ||
| 78 | for &p in ports { | 78 | for &p in ports { |
| 79 | // Enable latched detection | 79 | // Enable latched detection |
| 80 | #[cfg(feature = "_s")] | ||
| 81 | p.detectmode_sec().write(|w| w.set_detectmode(Detectmode::LDETECT)); | ||
| 82 | #[cfg(not(feature = "_s"))] | ||
| 80 | p.detectmode().write(|w| w.set_detectmode(Detectmode::LDETECT)); | 83 | p.detectmode().write(|w| w.set_detectmode(Detectmode::LDETECT)); |
| 81 | // Clear latch | 84 | // Clear latch |
| 82 | p.latch().write(|w| w.0 = 0xFFFFFFFF) | 85 | p.latch().write(|w| w.0 = 0xFFFFFFFF) |
| @@ -259,6 +262,11 @@ impl<'d> InputChannel<'d> { | |||
| 259 | .await; | 262 | .await; |
| 260 | } | 263 | } |
| 261 | 264 | ||
| 265 | /// Get the associated input pin. | ||
| 266 | pub fn pin(&self) -> &Input<'_> { | ||
| 267 | &self.pin | ||
| 268 | } | ||
| 269 | |||
| 262 | /// Returns the IN event, for use with PPI. | 270 | /// Returns the IN event, for use with PPI. |
| 263 | pub fn event_in(&self) -> Event<'d> { | 271 | pub fn event_in(&self) -> Event<'d> { |
| 264 | let g = regs(); | 272 | let g = regs(); |
