Skip to content
Snippets Groups Projects
Commit 65f5e2a9 authored by Josef Utbult's avatar Josef Utbult
Browse files

bare4_1

parent 6a59f26e
No related branches found
No related tags found
No related merge requests found
...@@ -33,12 +33,14 @@ use address::*; ...@@ -33,12 +33,14 @@ use address::*;
// rcc, chapter 6 // rcc, chapter 6
// gpio, chapter 8 // gpio, chapter 8
// Here we have low level access to a bit in a register
#[inline(always)] #[inline(always)]
fn read_u32(addr: u32) -> u32 { fn read_u32(addr: u32) -> u32 {
unsafe { core::ptr::read_volatile(addr as *const _) } unsafe { core::ptr::read_volatile(addr as *const _) }
// core::ptr::read_volatile(addr as *const _) // core::ptr::read_volatile(addr as *const _)
} }
// Here we have low level access to a bit in a register
#[inline(always)] #[inline(always)]
fn write_u32(addr: u32, val: u32) { fn write_u32(addr: u32, val: u32) {
unsafe { unsafe {
...@@ -83,7 +85,7 @@ const APP: () = { ...@@ -83,7 +85,7 @@ const APP: () = {
// //
// 1. Did you enjoy the blinking? // 1. Did you enjoy the blinking?
// //
// ** your answer here ** // I prefere longer intervals in my blinking, but it was quite pleasant.
// //
// Now lookup the data-sheets, and read each section referred, // Now lookup the data-sheets, and read each section referred,
// 6.3.11, 8.4.1, 8.4.7 // 6.3.11, 8.4.1, 8.4.7
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment