From f5076677a63f1d71d4b0446eda043caf0b288468 Mon Sep 17 00:00:00 2001 From: Josef Utbult <josutb-7@student.ltu.se> Date: Fri, 5 Mar 2021 15:27:23 +0100 Subject: [PATCH] bare5_1 --- examples/rtic_bare5.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/rtic_bare5.rs b/examples/rtic_bare5.rs index 5686e1b..c92497c 100644 --- a/examples/rtic_bare5.rs +++ b/examples/rtic_bare5.rs @@ -181,20 +181,20 @@ const APP: () = { loop { // set PA5 high - gpioa.BSRRH.write(1 << 5); // set bit, output hight (turn on led) + // gpioa.BSRRH.write(1 << 5); // set bit, output hight (turn on led) // alternatively to set the bit high we can // read the value, or with PA5 (bit 5) and write back - // gpioa.ODR.write(gpioa.ODR.read() | (1 << 5)); + gpioa.ODR.write(gpioa.ODR.read() | (1 << 5)); wait(10_000); // set PA5 low - gpioa.BSRRL.write(1 << 5); // clear bit, output low (turn off led) + // gpioa.BSRRL.write(1 << 5); // clear bit, output low (turn off led) // alternatively to clear the bit we can // read the value, mask out PA5 (bit 5) and write back - // gpioa.ODR.write(gpioa.ODR.read() & !(1 << 5)); + gpioa.ODR.write(gpioa.ODR.read() & !(1 << 5)); wait(10_000); } } @@ -214,6 +214,8 @@ const APP: () = { // // Run and see that the program behaves the same. // +// It does blink the same if thats what you mean. +// // Commit your answers (bare5_1) // // 2. Extend the read/write API with a `modify` for u32, taking the -- GitLab