Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR267 is here: rust-embedded#267 I forked rust-embedded/discovery, then cloned my fork from master and added upstream to my clone so the remotes for it are: wink@3900x:~/prgs/rust/tutorial/embedded-discovery/src/11-usart (fix-for-11-usart-using-pr267-and-tweaks) $ git remote -v origin git@github.com:winksaville/rust-embedded-discovery.git (fetch) origin git@github.com:winksaville/rust-embedded-discovery.git (push) upstream git@github.com:rust-embedded/discovery.git (fetch) upstream git@github.com:rust-embedded/discovery.git (push) I then fetched PR267 with: git fetch upstream pull/267/head:fix-for-11-usart-using-pr267-and-tweaks git checkout fix-for-11-usart-using-pr267-and-tweaks And then modified src/main.rs as follows: wink@3900x:~/prgs/rust/tutorial/embedded-discovery/src/11-usart (fix-for-11-usart-using-pr267-and-tweaks) $ git diff src/main.rs diff --git a/src/11-usart/src/main.rs b/src/11-usart/src/main.rs index 16c26e8..2357754 100644 --- a/src/11-usart/src/main.rs +++ b/src/11-usart/src/main.rs @@ -1,4 +1,4 @@ -#![deny(unsafe_code)] +//#![deny(unsafe_code)] #![no_main] #![no_std] @@ -6,11 +6,12 @@ use aux11::{entry, iprint, iprintln}; #[entry] +#[allow(unused_variables)] fn main() -> ! { let (usart1, mono_timer, itm) = aux11::init(); // Send a single character - usart1.tdr.write(|w| w.tdr().bits(u16::from(b'X'))); + unsafe { usart1.tdr.write(|w| w.tdr().bits(u16::from(b'X'))); } loop {} }
- Loading branch information