aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md5
-rw-r--r--src/macros.rs6
2 files changed, 8 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b4815fe..76bd264 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
+### Changed
+
+- `iprintln!` no longer depends on `iprint!`. `cortex_m::iprintln!` will work
+ even if `cortex_m::iprint` has not been imported.
+
## [v0.5.6] - 2018-08-27
### Fixed
diff --git a/src/macros.rs b/src/macros.rs
index e41cdc5..813552f 100644
--- a/src/macros.rs
+++ b/src/macros.rs
@@ -13,13 +13,13 @@ macro_rules! iprint {
#[macro_export]
macro_rules! iprintln {
($channel:expr) => {
- iprint!($channel, "\n");
+ $crate::itm::write_str($channel, "\n");
};
($channel:expr, $fmt:expr) => {
- iprint!($channel, concat!($fmt, "\n"));
+ $crate::itm::write_str($channel, concat!($fmt, "\n"));
};
($channel:expr, $fmt:expr, $($arg:tt)*) => {
- iprint!($channel, concat!($fmt, "\n"), $($arg)*);
+ $crate::itm::write_fmt($channel, format_args!(concat!($fmt, "\n"), $($arg)*));
};
}