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

bare0_2

parent 20499442
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ extern crate panic_halt;
use cortex_m_rt::entry;
// a constant (cannot be changed at run-time)
const X_INIT: u32 = 10;
const X_INIT: u32 = 4294967295;
// global mutabale variables (changed using unsafe code)
static mut X: u32 = X_INIT;
......@@ -67,7 +67,7 @@ fn main() -> ! {
// 2. Alter the constant X_INIT so that `x += 1` directly causes `x` to wrap
// what happens when `x` wraps
//
// ** your answer here **
// * Changed to 4294967295 (2^32 - 1). The program runs and ends up in a panic.
//
// Commit your answers (bare0_2)
//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment