Skip to content

Commit fd52819

Browse files
committed
Remove all clippy issues when targeting thumbv6m-none-eabi.
These clippy issue do not appear when building under non-arm targets, so they have been missed. Unblocks: rust-embedded#630
1 parent 47f2845 commit fd52819

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

cortex-m/src/peripheral/dwt.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,15 @@ pub struct Comparator {
6464

6565
// DWT CTRL register fields
6666
const NUMCOMP_OFFSET: u32 = 28;
67+
#[cfg(not(armv6m))]
6768
const NOTRCPKT: u32 = 1 << 27;
69+
#[cfg(not(armv6m))]
6870
const NOEXTTRIG: u32 = 1 << 26;
71+
#[cfg(not(armv6m))]
6972
const NOCYCCNT: u32 = 1 << 25;
73+
#[cfg(not(armv6m))]
7074
const NOPRFCNT: u32 = 1 << 24;
75+
#[cfg(not(armv6m))]
7176
const CYCCNTENA: u32 = 1 << 0;
7277

7378
impl DWT {

cortex-m/src/peripheral/scb.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use core::arch::asm;
55
use core::ptr;
66
#[cfg(any(armv7m, armv8m))]
77
use core::sync::atomic::{Ordering, compiler_fence};
8+
#[cfg(not(armv6m))]
89
use cortex_m_macros::asm_cfg;
910
use volatile_register::RW;
1011

0 commit comments

Comments
 (0)