Skip to content

Commit

Permalink
Merge #126
Browse files Browse the repository at this point in the history
126: Upgrade to aligned 0.3 r=adamgreig a=rnestler



Co-authored-by: Raphael Nestler <[email protected]>
  • Loading branch information
bors[bot] and rnestler committed Mar 12, 2019
2 parents 33d1909 + d8bf195 commit 04ee333
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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"

Expand Down
6 changes: 3 additions & 3 deletions src/itm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use core::{fmt, mem, ptr, slice};

use aligned::Aligned;
use aligned::{Aligned, A4};

use peripheral::itm::Stim;

Expand Down Expand Up @@ -77,7 +77,7 @@ pub fn write_all(port: &mut Stim, buffer: &[u8]) {
/// # Examples
///
/// ``` ignore
/// let mut buffer: Aligned<u32, _> = Aligned([0; 14]);
/// let mut buffer: Aligned<A4, _> = Aligned([0; 14]);
///
/// buffer.copy_from_slice(b"Hello, world!\n");
///
Expand All @@ -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<u32, [u8]>) {
pub fn write_aligned(port: &mut Stim, buffer: &Aligned<A4, [u8]>) {
unsafe {
let len = buffer.len();

Expand Down

0 comments on commit 04ee333

Please sign in to comment.