Skip to content
Snippets Groups Projects
Commit cddc31ff authored by Jonas Jacobsson's avatar Jonas Jacobsson
Browse files

changed main

parent f8f7e424
No related branches found
No related tags found
Loading
......@@ -26,8 +26,11 @@ const APP: () = {
struct Resources {
// late resources
GPIOA: stm32::GPIOA,
<<<<<<< HEAD
GPIOC: stm32::GPIOC,
//button: <stm32::GPIOC as int>::PC13,
=======
>>>>>>> 9be3604 (changed main)
}
#[init(schedule = [toggle])]
......@@ -61,6 +64,7 @@ const APP: () = {
// configure PA5 as output, RM0368 8.4.1
device.GPIOA.moder.modify(|_, w| w.moder5().bits(1));
<<<<<<< HEAD
// Test button thingy. Think I put PC13 to input
device.GPIOC.moder.modify(|_, w| w.moder13().bits(0));
// device.GPIOC.pupdr.modify(|_, w| w.pupdr13().bits(0));
......@@ -70,6 +74,11 @@ const APP: () = {
GPIOA: device.GPIOA,
GPIOC: device.GPIOC,
//button: device.button,
=======
// pass on late resources
init::LateResources {
GPIOA: device.GPIOA,
>>>>>>> 9be3604 (changed main)
}
}
......@@ -84,7 +93,11 @@ const APP: () = {
<<<<<<< HEAD
#[task(resources = [GPIOA,GPIOC], schedule = [toggle])]
=======
#[task(resources = [GPIOA], schedule = [toggle])]
>>>>>>> 9be3604 (changed main)
fn toggle(cx: toggle::Context) {
static mut TOGGLE: bool = false;
rprintln!("toggle @ {:?}", Instant::now());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment