From ecdb1146792c782c431f9c642a05d4fa1814b34e Mon Sep 17 00:00:00 2001 From: occheung Date: Thu, 10 Sep 2020 14:35:47 +0800 Subject: [PATCH] src: replace hprint with logging --- src/attenuator.rs | 1 - src/config_register.rs | 1 - src/dds.rs | 1 - src/lib.rs | 1 - src/nal_tcp_client.rs | 3 --- src/scpi.rs | 3 --- 6 files changed, 10 deletions(-) diff --git a/src/attenuator.rs b/src/attenuator.rs index d4b5294..15b7bdc 100644 --- a/src/attenuator.rs +++ b/src/attenuator.rs @@ -1,5 +1,4 @@ use embedded_hal::blocking::spi::Transfer; -use cortex_m_semihosting::hprintln; use core::assert; use crate::Error; diff --git a/src/config_register.rs b/src/config_register.rs index 3557217..324fb3e 100644 --- a/src/config_register.rs +++ b/src/config_register.rs @@ -1,5 +1,4 @@ use embedded_hal::blocking::spi::Transfer; -use cortex_m_semihosting::hprintln; use crate::Error; use core::mem::size_of; diff --git a/src/dds.rs b/src/dds.rs index 040ce77..037fb8d 100644 --- a/src/dds.rs +++ b/src/dds.rs @@ -1,5 +1,4 @@ use embedded_hal::blocking::spi::Transfer; -use cortex_m_semihosting::hprintln; use crate::Error; use core::mem::size_of; diff --git a/src/lib.rs b/src/lib.rs index 1a80ce1..3f24b64 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,7 +10,6 @@ use core::{ marker::PhantomData, }; use cortex_m; -use cortex_m_semihosting::hprintln; #[macro_use] pub mod bitmask_macro; diff --git a/src/nal_tcp_client.rs b/src/nal_tcp_client.rs index 9c77341..850b814 100644 --- a/src/nal_tcp_client.rs +++ b/src/nal_tcp_client.rs @@ -6,8 +6,6 @@ use heapless::{consts, Vec}; use stm32h7xx_hal::ethernet; use smoltcp as net; -use cortex_m_semihosting::hprintln; - use minimq::embedded_nal; #[derive(Debug)] @@ -61,7 +59,6 @@ impl<'a, 'b, 'c, 'n> NetworkStack<'a, 'b, 'c, 'n> { ) { Ok(changed) => changed == false, Err(e) => { - hprintln!("{:?}", e); true } } diff --git a/src/scpi.rs b/src/scpi.rs index 1a05587..5df6eb5 100644 --- a/src/scpi.rs +++ b/src/scpi.rs @@ -31,7 +31,6 @@ use scpi::{ // use scpi::suffix::{Frequency}; use embedded_hal::blocking::spi::Transfer; -use cortex_m_semihosting::hprintln; use crate::{ Urukul, @@ -271,7 +270,6 @@ impl Command for ClockDivisionCommand { Some(token) => { match f32::try_from(token) { Ok(val) => { - hprintln!("{}", val).unwrap(); if val == 1.0 || val == 2.0 || val == 4.0 { val as u8 } else { @@ -279,7 +277,6 @@ impl Command for ClockDivisionCommand { } }, Err(_e) => { - hprintln!("Checked numberic error").unwrap(); return Err(ErrorCode::IllegalParameterValue.into()) }, }