forked from M-Labs/kirdy
cleanup
This commit is contained in:
parent
e562b822dc
commit
1b3b121a2d
@ -48,7 +48,7 @@ pub fn bootup(mut core_perif: CorePeripherals, perif: Peripherals) -> Independen
|
||||
|
||||
let mut laser = CurrentSource {
|
||||
phy: current_source_phy,
|
||||
setting: CurrentSourceSettingsConstruct {
|
||||
setting: CurrentSourceSettings {
|
||||
output_current: 0.0,
|
||||
},
|
||||
};
|
||||
|
@ -9,7 +9,9 @@ pub fn init_log() {
|
||||
#[cfg(feature = "RTT")]
|
||||
pub fn init_log() {
|
||||
use super::rtt_logger;
|
||||
use rtt_target::rtt_init_print;
|
||||
static RTT_LOGGER: rtt_logger::Logger = rtt_logger::Logger;
|
||||
rtt_init_print!();
|
||||
let _ = log::set_logger(&RTT_LOGGER);
|
||||
log::set_max_level(log::LevelFilter::Debug);
|
||||
}
|
||||
|
@ -21,12 +21,12 @@ pub struct CurrentSourcePhyConstruct<C: CurrentSourcePhy> {
|
||||
pub current_source_ldo_en: C::CurrentSourceLdoEn,
|
||||
pub current_source_short: C::CurrentSourceShort,
|
||||
}
|
||||
pub struct CurrentSourceSettingsConstruct {
|
||||
pub struct CurrentSourceSettings {
|
||||
pub output_current: f32,
|
||||
}
|
||||
pub struct CurrentSource<C: CurrentSourcePhy> {
|
||||
pub phy: CurrentSourcePhyConstruct<C>,
|
||||
pub setting: CurrentSourceSettingsConstruct,
|
||||
pub setting: CurrentSourceSettings,
|
||||
}
|
||||
|
||||
pub struct CurrentSourcePhyCh0;
|
||||
|
@ -13,7 +13,7 @@ use device::{boot::bootup, log_setup, sys_timer};
|
||||
#[cfg(feature = "RTT")]
|
||||
use {
|
||||
core::panic::PanicInfo,
|
||||
rtt_target::{rprintln, rtt_init_print},
|
||||
rtt_target::rprintln,
|
||||
};
|
||||
#[cfg(feature = "RTT")]
|
||||
#[panic_handler]
|
||||
@ -28,10 +28,6 @@ use panic_halt as _;
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
// RTT does not rely on any peripherals, can be set up immidiately
|
||||
#[cfg(feature = "RTT")]
|
||||
rtt_init_print!();
|
||||
|
||||
log_setup::init_log();
|
||||
info!("Kirdy init");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user