some refactoring and clippies
Build and Release Firmware / build-and-release (push) Failing after 48s

This commit is contained in:
ktims committed 2026-11-05 12:26:48 -07:00
1 parent bb7f701f20
commit e255636f3a
8 files changed
+119 -102

No files matched your search

+9 -5
View File
@@ -4,7 +4,7 @@ use core::mem::MaybeUninit;
use crate::hal;
use crate::pac;
use defmt::{debug, info};
use defmt::debug;
use hal::{
Enabled, Iocon, Pin,
drivers::pins,
@@ -124,13 +124,16 @@ pub(crate) fn init_sys_pll1() {
syscon.mainclkselb.modify(|_, w| w.sel().enum_0x2()); // pll1
}
// Fo = M/(N*2*P) * Fin
// Fo = 3072/(125*2*8) * 16MHz = 24.576MHz
const AUDIO_PLL: PllConstants = PllConstants::new(125, 3072, 8);
// Set PLL0 to 24.576MHz, start, and wait for lock
// This is not exposed by lpc55-hal, unfortunately. Copy their implementation here.
#[cfg(feature = "evk")]
pub(crate) fn init_audio_pll() {
use defmt::info;
// Fo = M/(N*2*P) * Fin
// Fo = 3072/(125*2*8) * 16MHz = 24.576MHz
const AUDIO_PLL: PllConstants = PllConstants::new(125, 3072, 8);
let syscon = unsafe { &*pac::SYSCON::ptr() };
let pmc = unsafe { &*pac::PMC::ptr() };
let anactrl = unsafe { &*pac::ANACTRL::ptr() };
@@ -200,6 +203,7 @@ pub struct SharedLed<T: OutputPin> {
inner: UnsafeCell<T>,
}
unsafe impl<T: OutputPin> Sync for SharedLed<T> {}
#[allow(dead_code)]
impl<T: OutputPin> SharedLed<T> {
pub fn new(inner: T) -> Self {
Self {