From d8bf195b1d2634bef0fcac00e68ff64b2be0754c Mon Sep 17 00:00:00 2001 From: Raphael Nestler Date: Sun, 9 Dec 2018 22:23:48 +0100 Subject: [PATCH] Upgrade to aligned 0.3 --- Cargo.toml | 2 +- src/itm.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cf46c296..eaa670a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/japaric/cortex-m" version = "0.5.8" [dependencies] -aligned = "0.2.0" +aligned = "0.3.1" bare-metal = "0.2.0" volatile-register = "0.2.0" diff --git a/src/itm.rs b/src/itm.rs index 0e32e3cf..4f8dcf87 100644 --- a/src/itm.rs +++ b/src/itm.rs @@ -4,7 +4,7 @@ use core::{fmt, mem, ptr, slice}; -use aligned::Aligned; +use aligned::{Aligned, A4}; use peripheral::itm::Stim; @@ -77,7 +77,7 @@ pub fn write_all(port: &mut Stim, buffer: &[u8]) { /// # Examples /// /// ``` ignore -/// let mut buffer: Aligned = Aligned([0; 14]); +/// let mut buffer: Aligned = Aligned([0; 14]); /// /// buffer.copy_from_slice(b"Hello, world!\n"); /// @@ -86,7 +86,7 @@ pub fn write_all(port: &mut Stim, buffer: &[u8]) { /// // Or equivalently /// itm::write_aligned(&itm.stim[0], &Aligned(*b"Hello, world!\n")); /// ``` -pub fn write_aligned(port: &mut Stim, buffer: &Aligned) { +pub fn write_aligned(port: &mut Stim, buffer: &Aligned) { unsafe { let len = buffer.len();