From 15c162757f23ce0f0e91bc2b3fd790a07dc7cc4d Mon Sep 17 00:00:00 2001 From: Jan Niehusmann Date: Thu, 25 Nov 2021 17:38:18 +0100 Subject: [PATCH] Update docs in rp2040-hal/src/pio.rs Co-authored-by: Wilfried Chauveau --- rp2040-hal/src/pio.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rp2040-hal/src/pio.rs b/rp2040-hal/src/pio.rs index faf16b1..bc52b79 100644 --- a/rp2040-hal/src/pio.rs +++ b/rp2040-hal/src/pio.rs @@ -525,13 +525,13 @@ impl StateMachine { self.exec_instruction(instruction); } - ///Execute the instruction immediately. + /// Execute the instruction immediately. + /// + /// While this is allowed even when the state machine is running, the datasheet says: + /// > If EXEC instructions are used, instructions written to INSTR must not stall. + /// It's unclear what happens if this is violated. pub fn exec_instruction(&mut self, instruction: u16) { - // This is allowed even if the state machine is running. - // - // However, the datasheet says: - // "If EXEC instructions are used, instructions written to INSTR must not stall" - // It's unclear what happens if this is violated. + // TODO: clarify what happens if the instruction stalls. self.sm.exec_instruction(instruction); }