mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2025-01-27 08:18:07 +00:00
[untested] switch rest of dk over to defmt as well
This commit is contained in:
parent
8dbde637bb
commit
c80e9fd620
3 changed files with 4 additions and 5 deletions
|
@ -10,7 +10,6 @@ cortex-m = "0.6.4"
|
||||||
cortex-m-rt = "0.6.13"
|
cortex-m-rt = "0.6.13"
|
||||||
embedded-hal = "0.2.3"
|
embedded-hal = "0.2.3"
|
||||||
hal = { package = "nrf52840-hal", version = "0.12.1" }
|
hal = { package = "nrf52840-hal", version = "0.12.1" }
|
||||||
log = "0.4.8"
|
|
||||||
defmt = "0.2.1"
|
defmt = "0.2.1"
|
||||||
defmt-rtt = "0.2.0"
|
defmt-rtt = "0.2.0"
|
||||||
panic-probe = { version = "0.2.0", features = ["print-defmt" ] }
|
panic-probe = { version = "0.2.0", features = ["print-defmt" ] }
|
||||||
|
|
|
@ -96,7 +96,7 @@ impl Led {
|
||||||
|
|
||||||
/// Turns off the LED
|
/// Turns off the LED
|
||||||
pub fn off(&mut self) {
|
pub fn off(&mut self) {
|
||||||
log::trace!(
|
defmt::trace!(
|
||||||
"setting P{}.{} high (LED off)",
|
"setting P{}.{} high (LED off)",
|
||||||
if self.inner.port() == Port::Port1 {
|
if self.inner.port() == Port::Port1 {
|
||||||
'1'
|
'1'
|
||||||
|
|
|
@ -51,7 +51,7 @@ impl Ep0In {
|
||||||
|
|
||||||
self.busy = true;
|
self.busy = true;
|
||||||
|
|
||||||
log::info!("EP0IN: start {}B transfer", n);
|
defmt::info!("EP0IN: start {}B transfer", n);
|
||||||
|
|
||||||
// start DMA transfer
|
// start DMA transfer
|
||||||
dma_start();
|
dma_start();
|
||||||
|
@ -75,7 +75,7 @@ impl Ep0In {
|
||||||
usbd.events_ep0datadone.reset();
|
usbd.events_ep0datadone.reset();
|
||||||
|
|
||||||
self.busy = false;
|
self.busy = false;
|
||||||
log::info!("EP0IN: transfer done");
|
defmt::info!("EP0IN: transfer done");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ pub fn init(power: POWER, usbd: &USBD) {
|
||||||
// wait until the USB cable has been connected
|
// wait until the USB cable has been connected
|
||||||
while power.events_usbdetected.read().bits() == 0 {
|
while power.events_usbdetected.read().bits() == 0 {
|
||||||
if once {
|
if once {
|
||||||
log::info!("waiting for USB connection on port J3");
|
defmt::info!("waiting for USB connection on port J3");
|
||||||
once = false;
|
once = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue