Skip to content
Snippets Groups Projects
Commit 87f6f30c authored by anttib-5's avatar anttib-5
Browse files

bare5_1

parent da530ce6
Branches
No related tags found
No related merge requests found
...@@ -186,14 +186,14 @@ fn idle(rcc: &mut RCC, gpioa: &mut GPIOA) { ...@@ -186,14 +186,14 @@ fn idle(rcc: &mut RCC, gpioa: &mut GPIOA) {
loop { loop {
// set PA5 high // 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)
// gpioa.ODR.write(gpioa.ODR.read() | (1 << 5)); gpioa.ODR.write(gpioa.ODR.read() | (1 << 5));
wait(10_000); wait(10_000);
// set PA5 low // 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)
// gpioa.ODR.write(gpioa.ODR.read() & !(1 << 5)); gpioa.ODR.write(gpioa.ODR.read() & !(1 << 5));
wait(10_000); wait(10_000);
} }
} }
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment