Skip to content

Commit

Permalink
Removed bare_metal crate
Browse files Browse the repository at this point in the history
Implemented cortex_m 0.7.6 pub unsafe trait InterruptNumber
  • Loading branch information
amcelroy authored and sbourdeauducq committed Dec 21, 2022
1 parent 3e039a0 commit 77a40f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions crates/tm4c123x/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![no_std]
extern crate bare_metal;
extern crate cortex_m;
#[cfg(feature = "rt")]
extern crate cortex_m_rt;
Expand Down Expand Up @@ -422,10 +421,10 @@ pub enum Interrupt {
#[doc = "138 - PWM1 Fault"]
PWM1_FAULT = 138,
}
unsafe impl bare_metal::Nr for Interrupt {
unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
#[inline(always)]
fn nr(&self) -> u8 {
*self as u8
fn number(self) -> u16 {
self as u16
}
}
#[cfg(feature = "rt")]
Expand Down
7 changes: 3 additions & 4 deletions crates/tm4c129x/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![no_std]
extern crate bare_metal;
extern crate cortex_m;
#[cfg(feature = "rt")]
extern crate cortex_m_rt;
Expand Down Expand Up @@ -476,10 +475,10 @@ pub enum Interrupt {
#[doc = "111 - GPIO T"]
GPIOT = 111,
}
unsafe impl bare_metal::Nr for Interrupt {
unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
#[inline(always)]
fn nr(&self) -> u8 {
*self as u8
fn number(self) -> u16 {
self as u16
}
}
#[cfg(feature = "rt")]
Expand Down

0 comments on commit 77a40f0

Please sign in to comment.