Skip to content

Commit 5e6291d

Browse files
committed
Re-applying some partial fixes
Contains partial commits from rust-embedded#490, rust-embedded#534, rust-embedded#544, and rust-embedded#562.
2 parents db2a3f8 + ccc4283 commit 5e6291d

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

cortex-m/CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10-
- MSRV is 1.61 to match cortex-m-rt crate
10+
## Changed
11+
12+
- Bumped MSRV to 1.61 for compatibility with syn versions >=2.0.68 and to match cortex-m-rt crate
13+
14+
### Added
15+
16+
- Added `set_sevonpend` and `clear_sevonpend` (#539).
1117

1218
## [v0.7.7] - 2023-01-03
1319

cortex-m/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ rust-version = "1.61"
2020
bare-metal = { version = "0.2.4", features = ["const-fn"] }
2121
critical-section = { version = "1.0.0", optional = true }
2222
volatile-register = "0.2.2"
23-
bitfield = "0.13.2"
23+
bitfield = "0.15.0"
2424
embedded-hal = "0.2.4"
2525

2626
[dependencies.serde]

cortex-m/src/itm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ unsafe fn write_aligned_impl(port: &mut Stim, buffer: &[u8]) {
5757

5858
struct Port<'p>(&'p mut Stim);
5959

60-
impl<'p> fmt::Write for Port<'p> {
60+
impl fmt::Write for Port<'_> {
6161
#[inline]
6262
fn write_str(&mut self, s: &str) -> fmt::Result {
6363
write_all(self.0, s.as_bytes());

cortex-m/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
//!
6464
//! # Minimum Supported Rust Version (MSRV)
6565
//!
66-
//! This crate is guaranteed to compile on stable Rust 1.59 and up. It *might*
66+
//! This crate is guaranteed to compile on stable Rust 1.61 and up. It *might*
6767
//! compile with older versions but that may change in any new patch release.
6868
6969
#![deny(missing_docs)]

cortex-m/src/peripheral/ac.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub struct RegisterBlock {
1616
/// AHB Slave Control Register
1717
pub ahbscr: RW<u32>,
1818
reserved0: u32,
19-
/// Auxilary Bus Fault Status Register
19+
/// Auxiliary Bus Fault Status Register
2020
pub abfsr: RW<u32>,
2121
}
2222

cortex-m/src/peripheral/scb.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ impl SCB {
344344
let mut cbp = unsafe { CBP::new() };
345345

346346
// Disable I-cache
347-
// NOTE(unsafe): We have synchronised access by &mut self
347+
// NOTE(unsafe): We have synchronized access by &mut self
348348
unsafe { self.ccr.modify(|r| r & !SCB_CCR_IC_MASK) };
349349

350350
// Invalidate I-cache
@@ -417,7 +417,7 @@ impl SCB {
417417
}
418418

419419
// Turn off the D-cache
420-
// NOTE(unsafe): We have synchronised access by &mut self
420+
// NOTE(unsafe): We have synchronized access by &mut self
421421
unsafe { self.ccr.modify(|r| r & !SCB_CCR_DC_MASK) };
422422

423423
// Clean and invalidate whatever was left in it
@@ -646,10 +646,7 @@ impl SCB {
646646
/// a runtime-dependent `panic!()` call.
647647
#[inline]
648648
pub unsafe fn invalidate_dcache_by_slice<T>(&mut self, slice: &mut [T]) {
649-
self.invalidate_dcache_by_address(
650-
slice.as_ptr() as usize,
651-
slice.len() * core::mem::size_of::<T>(),
652-
);
649+
self.invalidate_dcache_by_address(slice.as_ptr() as usize, core::mem::size_of_val(slice));
653650
}
654651

655652
/// Cleans D-cache by address.
@@ -732,10 +729,7 @@ impl SCB {
732729
/// to main memory, overwriting whatever was in main memory.
733730
#[inline]
734731
pub fn clean_dcache_by_slice<T>(&mut self, slice: &[T]) {
735-
self.clean_dcache_by_address(
736-
slice.as_ptr() as usize,
737-
slice.len() * core::mem::size_of::<T>(),
738-
);
732+
self.clean_dcache_by_address(slice.as_ptr() as usize, core::mem::size_of_val(slice));
739733
}
740734

741735
/// Cleans and invalidates D-cache by address.

xtask/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ name = "ci"
1010
harness = false
1111

1212
[dependencies]
13-
ar = "0.8.0"
13+
ar = "0.9.0"
1414
cortex-m = { path = "../cortex-m", features = ["serde", "std"] }
1515
serde_json = "1"

xtask/tests/ci.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ static NON_BASE_TARGETS: &[&str] = &[
2727
fn build(package: &str, target: &str, features: &[&str]) {
2828
println!("building {} for {} {:?}", package, target, features);
2929
let mut cargo = Command::new("cargo");
30-
cargo.args(&["build", "-p", package, "--target", target]);
30+
cargo.args(["build", "-p", package, "--target", target]);
3131
for feat in features {
32-
cargo.args(&["--features", *feat]);
32+
cargo.args(["--features", *feat]);
3333
}
3434

3535
// Cargo features don't work right when invoked from the workspace root, so change to the
@@ -73,7 +73,7 @@ fn check_crates_build(is_nightly: bool, is_msrv: bool) {
7373
let used_features = &*all_features
7474
.iter()
7575
.copied()
76-
.filter(|feat| should_use_feature(*feat))
76+
.filter(|feat| should_use_feature(feat))
7777
.collect::<Vec<_>>();
7878

7979
// (note: we don't test with default features disabled, since we don't use them yet)

0 commit comments

Comments
 (0)