some refactoring and clippies
Build and Release Firmware / build-and-release (push) Failing after 48s
Build and Release Firmware / build-and-release (push) Failing after 48s
This commit is contained in:
1 parent
bb7f701f20
commit
e255636f3a
8 files changed
+119
-102
No files matched your search
+9
-5
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user