From 9bce594db2a56b12e8639dce78a5e219291939d1 Mon Sep 17 00:00:00 2001 From: Kasil Date: Sun, 5 Jun 2022 13:56:46 +0200 Subject: [PATCH] Add accessor for installed pio program offset (#355) --- rp2040-hal/src/pio.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rp2040-hal/src/pio.rs b/rp2040-hal/src/pio.rs index bd6207a..0f98d76 100644 --- a/rp2040-hal/src/pio.rs +++ b/rp2040-hal/src/pio.rs @@ -301,6 +301,11 @@ impl InstalledProgram

{ self.offset + self.wrap.target } + /// Get the offset the program is installed at. + pub fn offset(&self) -> u8 { + self.offset + } + /// Clones this program handle so that it can be executed by two state machines at the same /// time. ///