From 8fa4d3f527f7cc3199cd10d4059fb711fefa9cc9 Mon Sep 17 00:00:00 2001 From: Daniel Egger Date: Thu, 25 Apr 2019 08:47:33 +0200 Subject: [PATCH] Fixed warning by uppercasing static variable Signed-off-by: Daniel Egger --- examples/flash_systick.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/flash_systick.rs b/examples/flash_systick.rs index 0f5bb36..338d47a 100644 --- a/examples/flash_systick.rs +++ b/examples/flash_systick.rs @@ -60,25 +60,25 @@ fn main() -> ! { #[exception] fn SysTick() -> ! { // Exception handler state variable - static mut state: u8 = 1; + static mut STATE: u8 = 1; // Enter critical section cortex_m::interrupt::free(|cs| { // Borrow access to our GPIO pin from the shared structure if let Some(ref mut led) = *GPIO.borrow(cs).borrow_mut().deref_mut() { // Check state variable, keep LED off most of the time and turn it on every 10th tick - if *state < 10 { + if *STATE < 10 { // Turn off the LED led.set_low(); // And now increment state variable - *state += 1; + *STATE += 1; } else { // Turn on the LED led.set_high(); // And set new state variable back to 0 - *state = 0; + *STATE = 0; } } });