Skip to content

Commit

Permalink
embedded: Add #[inline(never)] to lpc55 init methods
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-nitrokey authored and daringer committed Nov 25, 2022
1 parent eb0ae22 commit 7d6f15d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions runners/embedded/src/soc_lpc55/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ impl Stage0 {
.expect("Clock configuration failed")
}

#[inline(never)]
pub fn next(mut self, iocon: hal::Iocon<Unknown>, gpio: hal::Gpio<Unknown>) -> Stage1 {
unsafe {
super::types::DEVICE_UUID.copy_from_slice(&hal::uuid());
Expand Down Expand Up @@ -223,6 +224,7 @@ impl Stage1 {
}
}

#[inline(never)]
pub fn next(
mut self,
adc: hal::Adc<Unknown>,
Expand Down Expand Up @@ -450,6 +452,7 @@ impl Stage2 {
info_now!("hardware checks successful");
}

#[inline(never)]
pub fn next(
mut self,
flexcomm0: hal::peripherals::flexcomm::Flexcomm0<Unknown>,
Expand Down Expand Up @@ -495,6 +498,7 @@ pub struct Stage3 {
}

impl Stage3 {
#[inline(never)]
pub fn next(
mut self,
rng: hal::peripherals::rng::Rng<Unknown>,
Expand Down Expand Up @@ -536,6 +540,7 @@ pub struct Stage4 {
}

impl Stage4 {
#[inline(never)]
pub fn next(mut self) -> Stage5 {
let syscon = &mut self.peripherals.syscon;
let pmc = &mut self.peripherals.pmc;
Expand Down Expand Up @@ -649,6 +654,7 @@ pub struct Stage5 {
}

impl Stage5 {
#[inline(never)]
pub fn next(mut self, rtc: hal::peripherals::rtc::Rtc<Unknown>) -> Stage6 {
let syscon = &mut self.peripherals.syscon;
let pmc = &mut self.peripherals.pmc;
Expand Down Expand Up @@ -710,6 +716,7 @@ impl Stage6 {
}
}

#[inline(never)]
pub fn next(mut self) -> All {
self.perform_data_migrations();
let apps = crate::init_apps(&mut self.trussed, &self.store, self.clocks.is_nfc_passive);
Expand Down Expand Up @@ -752,6 +759,7 @@ pub struct All {
pub clock_controller: Option<DynamicClockController>,
}

#[inline(never)]
pub fn start(syscon: hal::Syscon, pmc: hal::Pmc, anactrl: hal::Anactrl) -> Stage0 {
let peripherals = Peripherals {
syscon,
Expand Down

0 comments on commit 7d6f15d

Please sign in to comment.