Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit 4a3539e

Browse files
committed
Code format
1 parent c84bed2 commit 4a3539e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/virq.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use riscv::register::mstatus;
2020
use riscv_rt::entry;
2121

2222
/* we have chosen the GPIO4 (a.k.a dig12) for this example */
23-
const GPIO_N : usize = 4;
23+
const GPIO_N: usize = 4;
2424

2525
/* Handler for the GPIO0 interrupt */
2626
#[no_mangle]
@@ -30,7 +30,7 @@ fn GPIO4() {
3030
/* Clear the GPIO pending interrupt */
3131
unsafe {
3232
let gpio_block = &*hifive1::hal::e310x::GPIO0::ptr();
33-
gpio_block.fall_ip.write(|w| w.bits(1<<GPIO_N));
33+
gpio_block.fall_ip.write(|w| w.bits(1 << GPIO_N));
3434
}
3535
}
3636

@@ -79,7 +79,7 @@ fn main() -> ! {
7979
}
8080
let gpio_block = &*hifive1::hal::e310x::GPIO0::ptr();
8181
/* Enable GPIO fall interrupts */
82-
gpio_block.fall_ie.write(|w| w.bits(1<<GPIO_N));
82+
gpio_block.fall_ie.write(|w| w.bits(1 << GPIO_N));
8383
gpio_block.rise_ie.write(|w| w.bits(0x0));
8484
/* Clear pending interrupts from previous states */
8585
gpio_block.fall_ip.write(|w| w.bits(0xffffffff));

0 commit comments

Comments
 (0)