From aafa3dd587611af8bc6651147cb18f4c0b016bc1 Mon Sep 17 00:00:00 2001 From: Jan Niehusmann Date: Mon, 1 Nov 2021 21:03:47 +0000 Subject: [PATCH] Keep old function as a deprecated alternative, for now Mainly so i2c-pio-rs doesn't fail, as it is used by examples. Should be removed once i2c-pio-rs is updated. --- rp2040-hal/src/pio.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rp2040-hal/src/pio.rs b/rp2040-hal/src/pio.rs index a9b4f8d..faf16b1 100644 --- a/rp2040-hal/src/pio.rs +++ b/rp2040-hal/src/pio.rs @@ -519,6 +519,12 @@ impl StateMachine { self.sm.sm().sm_addr.read().bits() } + #[deprecated(note = "Renamed to exec_instruction")] + ///Execute the instruction immediately. + pub fn set_instruction(&mut self, instruction: u16) { + self.exec_instruction(instruction); + } + ///Execute the instruction immediately. pub fn exec_instruction(&mut self, instruction: u16) { // This is allowed even if the state machine is running.