Commit 6e8b8a45 authored by DevDoggo's avatar DevDoggo

changing branch

parent 140426a5
......@@ -148,6 +148,20 @@ fn r_ead(addr: u32) -> u32 {
}
}
// 2.
// Extend the read/write API with a modify, taking the address, field offsbet, field width, and value.
//
// Change the code into using your new API.
//
// Run and see that the program behaves the same.
//
// commit your answers (bare5_2)
fn m_odify(addr: u32, offset: u32, width: u32, val: u32) {
//something like this, it's a start
addr = addr | (val << offset);
}
// user application
fn idle(rcc: &mut RCC, gpioa: &mut GPIOA) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment