From 50dcf7880fe4f23f25e1992edb3d642ebbc05f3d Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 8 May 2026 03:13:30 +0800 Subject: [PATCH] add a wfi specifier to the bio clock change api this indicates if we're going into or out of wfi - this matters because the clock rate asymmetry can be quite great, and the calling function can have different optimizations for each mode of operation --- libs/bao1x-api/src/bio.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/bao1x-api/src/bio.rs b/libs/bao1x-api/src/bio.rs index 01234d36e..553633cba 100644 --- a/libs/bao1x-api/src/bio.rs +++ b/libs/bao1x-api/src/bio.rs @@ -52,8 +52,8 @@ pub trait BioApi<'a> { fn update_bio_freq(&mut self, freq: u32) -> u32; /// Called before frequency changes to activate any application-specific callbacks - /// to avoid glitches. - fn prep_freq_change(&mut self); + /// to avoid glitches. `into_wfi` specifies if we're about to enter a WFI state. + fn prep_freq_change(&mut self, into_wfi: bool); /// Returns the frequency, in Hz, of the incoming clock to the BIO cores. fn get_bio_freq(&self) -> u32;