From 374c7513f905fcbf353bee2987e78d68fe8ea303 Mon Sep 17 00:00:00 2001 From: pennae Date: Sat, 6 May 2023 17:24:06 +0200 Subject: [PATCH] rp/pio: mark exec_instr as unsafe because it most definitely is. --- embassy-rp/src/pio.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/embassy-rp/src/pio.rs b/embassy-rp/src/pio.rs index 7cf605d8..5fed4f1f 100644 --- a/embassy-rp/src/pio.rs +++ b/embassy-rp/src/pio.rs @@ -790,10 +790,8 @@ impl<'d, PIO: Instance + 'd, const SM: usize> StateMachine<'d, PIO, SM> { } } - pub fn exec_instr(&mut self, instr: u16) { - unsafe { - Self::this_sm().instr().write(|w| w.set_instr(instr)); - } + pub unsafe fn exec_instr(&mut self, instr: u16) { + Self::this_sm().instr().write(|w| w.set_instr(instr)); } pub fn rx(&mut self) -> &mut StateMachineRx<'d, PIO, SM> {