Skip to content
Snippets Groups Projects
Commit a6118ca6 authored by August Svensson's avatar August Svensson
Browse files

merge conflict...

parent 7d5110c3
No related branches found
No related tags found
No related merge requests found
......@@ -199,29 +199,19 @@ fn idle(rcc: &mut RCC, gpioa: &mut GPIOA) {
let led_odr = &gpioa.ODR;
loop {
// set PA5 high
<<<<<<< HEAD
// gpioa.BSRRH.write(1 << 5); // set bit, output hight (turn on led)
gpioa.ODR.write(gpioa.ODR.read() | (1 << 5));
=======
// gpioa.ODR.modify(5u8, 1u8, 1u32);
led_odr.modify(5u8, 1u8, 1u32);
// gpioa.BSRRH.write(1 << 5); // set bit, output hight (turn on led)
// gpioa.ODR.write(gpioa.ODR.read() | (1 << 5));
>>>>>>> student-1
wait(10_000);
// set PA5 low
<<<<<<< HEAD
// gpioa.BSRRL.write(1 << 5); // clear bit, output low (turn off led)
gpioa.ODR.write(gpioa.ODR.read() & !(1 << 5));
=======
// gpioa.ODR.modify(5u8, 1u8, 0u32);
led_odr.modify(5u8, 1u8, 0u32);
// gpioa.BSRRL.write(1 << 5); // clear bit, output low (turn off led)
// gpioa.ODR.write(gpioa.ODR.read() & !(1 << 5));
>>>>>>> student-1
wait(10_000);
}
}
......@@ -271,10 +261,3 @@ fn idle(rcc: &mut RCC, gpioa: &mut GPIOA) {
// Notice, over-shifting (where bits are spilled) is always considered legal,
// its just the shift amuount that is checked.
// There are explicit unchecked versions available if so wanted.
\ No newline at end of file
//
// ** ORDERING IS WRONG FOR OPTIMIZED CODE **
// When I run the --release build, the LED is constantly turned on. HOWEVER,
// if I set breakpoints and pause in the --release build, I can pause it
// just after the LED-turn-off call and the LED turns off, proving that the
// instructions work in release as they do in debug, but that it doesn't wait
// before running the turn-on call as it should.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment