diff options
author | 2017-07-04 14:59:36 -0500 | |
---|---|---|
committer | 2017-07-04 14:59:36 -0500 | |
commit | 9828d7c4f3eddde66526df183acfb9360ee2bece (patch) | |
tree | d0287add5f774236231d21bf876c975d998f1008 | |
parent | 6c642b7f3efbe8806a2e6d12ba1beb04c83486d5 (diff) | |
download | cortex-m-9828d7c4f3eddde66526df183acfb9360ee2bece.tar.gz cortex-m-9828d7c4f3eddde66526df183acfb9360ee2bece.tar.zst cortex-m-9828d7c4f3eddde66526df183acfb9360ee2bece.zip |
remove re-export of cortex-m-semihosting
the functionality is not fundamental and can be easily added to a program by
directly depending on cortex-m-semihosting
-rw-r--r-- | Cargo.toml | 1 | ||||
-rw-r--r-- | src/lib.rs | 1 | ||||
-rw-r--r-- | src/macros.rs | 48 |
3 files changed, 0 insertions, 50 deletions
@@ -11,5 +11,4 @@ version = "0.3.0" [dependencies] aligned = "0.1.1" -cortex-m-semihosting = "0.1.3" volatile-register = "0.2.0"
\ No newline at end of file @@ -15,7 +15,6 @@ #![no_std] extern crate aligned; -pub extern crate cortex_m_semihosting as semihosting; extern crate volatile_register; #[macro_use] diff --git a/src/macros.rs b/src/macros.rs index a96acbe..465d759 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -1,51 +1,3 @@ -/// Macro for printing to the **host's** standard stderr -#[macro_export] -macro_rules! ehprint { - ($s:expr) => { - $crate::semihosting::io::ewrite_str($s); - }; - ($($arg:tt)*) => { - $crate::semihosting::io::ewrite_fmt(format_args!($($arg)*)); - }; -} - -/// Macro for printing to the **host's** standard error, with a newline. -#[macro_export] -macro_rules! ehprintln { - () => (ehprint!("\n")); - ($fmt:expr) => { - ehprint!(concat!($fmt, "\n")); - }; - ($fmt:expr, $($arg:tt)*) => { - ehprint!(concat!($fmt, "\n"), $($arg)*); - }; -} - -/// Macro for printing to the **host's** standard output -#[macro_export] -macro_rules! hprint { - ($s:expr) => { - $crate::semihosting::io::write_str($s); - }; - ($($arg:tt)*) => { - $crate::semihosting::io::write_fmt(format_args!($($arg)*)); - }; -} - -/// Macro for printing to the **host's** standard output, with a newline. -#[macro_export] -macro_rules! hprintln { - () => { - hprint!("\n"); - }; - ($fmt:expr) => { - hprint!(concat!($fmt, "\n")); - }; - ($fmt:expr, $($arg:tt)*) => { - hprint!(concat!($fmt, "\n"), $($arg)*); - }; -} - /// Macro for sending a formatted string through an ITM channel #[macro_export] macro_rules! iprint { |