diff --git a/examples/pmw3389.rs b/examples/pmw3389.rs index 9206c47c6a8b144f0da1d4eaa25fbfcd15cadb6d..56bbc27beddc9c37bf19d531adb55da0c3e2def2 100644 --- a/examples/pmw3389.rs +++ b/examples/pmw3389.rs @@ -88,7 +88,9 @@ const APP: () = { // iprintln!(stim, "t1 {}", t1); // iprintln!(stim, "t2 {}", t2); - let mut pmw3389 = pmw3389::Pmw3389::new(spi, cs, delay).unwrap(); + let mut pmw3389 = pmw3389::Pmw3389::new(spi, cs, delay, &mut core.ITM).unwrap(); + + let stim = &mut core.ITM.stim[0]; let id = pmw3389.product_id().unwrap(); iprintln!(stim, "id {}", id); @@ -301,7 +303,7 @@ mod pmw3389 { spi: SPI, cs: CS, delay: DwtDelay, - mut itm: stm32f4::stm32f411::ITM, + itm: &mut stm32f4::stm32f411::ITM, ) -> Result<Self, E> { let mut pmw3389 = Pmw3389 { spi, cs, delay }; @@ -389,7 +391,7 @@ mod pmw3389 { } /// - pub fn upload_firmware(&mut self, mut itm: stm32f4::stm32f411::ITM) -> Result<(), E> { + pub fn upload_firmware(&mut self, itm: &mut stm32f4::stm32f411::ITM) -> Result<(), E> { let stim = &mut itm.stim[0]; // send the firmware to the chip, cf p.18 of the datasheet // Serial.println("Uploading firmware..."); diff --git a/memory.x b/memory.x index b28d0cd1f88bc001f4636f8b4c3e549819869dca..3f5f41f7abacc02d21794ab103ba780f8b7174d2 100644 --- a/memory.x +++ b/memory.x @@ -3,7 +3,7 @@ MEMORY /* NOTE 1 K = 1 KiBi = 1024 bytes */ /* TODO Adjust these memory regions to match your device memory layout */ /* These values correspond to the STM32F411 */ - FLASH : ORIGIN = 0x08000000, LENGTH = 64K + FLASH : ORIGIN = 0x08000000, LENGTH = 256K RAM : ORIGIN = 0x20000000, LENGTH = 64K }