diff --git a/Cargo.toml b/Cargo.toml index 4fa2c4fba6ca3a3a5ea9a235a6beb6957abb6600..38815fca2901ab8d6071ab343f70c6f635cfd6b0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,6 +34,14 @@ version = "0.2.0" git = "https://github.com/jsjolund/f4" version = "0.1.0" +[dependencies.heapless] +git = "https://github.com/japaric/heapless.git" +version = "0.2.1" + +[dependencies.nb] +git = "https://github.com/japaric/nb.git" +version = "0.1.1" + [features] wcet_bkpt = [] wcet_nop = [] @@ -44,4 +52,4 @@ debug = true [profile.dev] codegen-units = 1 -incremental = false \ No newline at end of file +incremental = false diff --git a/examples/.bare6.rs.swp b/examples/.bare6.rs.swp deleted file mode 100644 index 68d0b25e445df679880bc7a6284681024a098f34..0000000000000000000000000000000000000000 Binary files a/examples/.bare6.rs.swp and /dev/null differ diff --git a/examples/.bare7.rs.swp b/examples/.bare7.rs.swp new file mode 100644 index 0000000000000000000000000000000000000000..2857c6dcee63c8c07b2346e8da901c176fedb656 Binary files /dev/null and b/examples/.bare7.rs.swp differ diff --git a/examples/bare6.rs b/examples/bare6.rs index ba6c72727bf7175a79ab9e0e59669be6d1f2f459..3495eb821bca05324676e0e953804d6bd8fde520 100644 --- a/examples/bare6.rs +++ b/examples/bare6.rs @@ -59,6 +59,7 @@ fn clock_out(rcc: &mut RCC, gpioc: &mut GPIOC) { // otyper reset state push/pull, in reset state (don't need to change) // ospeedr 0b11 = high speed + // ospeedr 0d00 = low speed gpioc .ospeedr .modify(|_, w| unsafe { w.ospeedr9().bits(0b11) }); diff --git a/examples/bare7.rs b/examples/bare7.rs index 101a29ea0ed6b89a27a91b01969f43cced223e28..2cec84b8473b94679cd490e1a7cd9adf8aecd8a4 100644 --- a/examples/bare7.rs +++ b/examples/bare7.rs @@ -48,7 +48,7 @@ fn init(p: init::Peripherals) { let _ = serial.write(byte); } Err(err) => { - ipln!("Error {:?}", err); + ipln!("Error {:?}: the bufer overflows. Type slower", err); p.USART2.dr.read(); // clear the error by reading the data register } } @@ -89,9 +89,10 @@ fn idle() -> ! { // (just send the characters not the single quotes and commas) // what did you receive, and what was the output of the ITM trace // ** your answer here ** -// +// a b c d it echo emidtly. // // why did the transmission fail? (hint, think about timing...) // ** your answer here ** +// it is set to 8 byte som it sent 1 charakter att the time and ther for is the echo per charakter // // commit your answers (bare7_1) // @@ -99,7 +100,9 @@ fn idle() -> ! { // 'a', 'b', 'c', 'd', 'e' character by character // what did you receive, and what was the output of the ITM trace // ** your answer here ** -// +// "ok [96,97,98,99] +// repit ... +// // if done correctly you see an evedince of Rust's memory safety // the buffer will be saturated (all elements occupied) // but no buffer owerwrite will occur (outside the buffer) diff --git a/serielset.txt b/serielset.txt new file mode 100644 index 0000000000000000000000000000000000000000..fee2f398a24ec56507c2a68dbbbb2a187b7dd42d --- /dev/null +++ b/serielset.txt @@ -0,0 +1,4 @@ +/dev/ttaACM0 +115200 +8 +1