Skip to content

Commit

Permalink
clock/v2: Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
glaeqen authored and vcchtjader committed Oct 11, 2021
1 parent d7b047a commit bddd31f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
8 changes: 3 additions & 5 deletions hal/src/thumbv7em/clock/v2/dfll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::clock::v2::{
use crate::time::{Hertz, U32Ext};
use crate::typelevel::Sealed;

use super::gclk::{Gclk0, GclkSource, GclkSourceEnum, GclkSourceMarker, GclkNum};
use super::gclk::{Gclk0, GclkNum, GclkSource, GclkSourceEnum, GclkSourceMarker};
use super::gclkio::NotGclkInput;
use super::pclk::{Dfll48, Pclk, PclkSourceMarker};

Expand Down Expand Up @@ -170,7 +170,7 @@ pub trait LoopMode: Sealed {
/// implementations blocks for [`Enabled`]`<`[`Dfll`]`<`[`OpenLoop`]`>>` and
/// [`Dfll`]`<`[`OpenLoop`]`>` structs
pub struct OpenLoop {
__: ()
__: (),
}

impl LoopMode for OpenLoop {
Expand Down Expand Up @@ -257,9 +257,7 @@ impl Dfll<OpenLoop> {
Self {
token,
freq: 48.mhz().into(),
mode: OpenLoop {
__: ()
},
mode: OpenLoop { __: () },
multiplication_factor: 1_u16,
run_standby: false,
on_demand_mode: true,
Expand Down
3 changes: 2 additions & 1 deletion hal/src/thumbv7em/clock/v2/gclk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,8 @@ where
/// This struct represents a disabled [`Gclk`] - generic clock generator
///
/// It is generic over:
/// - a numeric variant (available variants: [`GclkNum`] implementors - eg. [`marker::Gclk3`])
/// - a numeric variant (available variants: [`GclkNum`] implementors - eg.
/// [`marker::Gclk3`])
/// - a current signal source (expressed via source's marker type)
pub struct Gclk<G, T>
where
Expand Down
4 changes: 2 additions & 2 deletions hal/src/thumbv7em/clock/v2/osculp32k.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ use crate::pac::osc32kctrl::rtcctrl::RTCSEL_A;
use crate::pac::osc32kctrl::OSCULP32K;

use crate::clock::v2::{
rtc::RtcSourceMarker,
types::{Counter, Enabled},
Source, SourceMarker,
rtc::{RtcSourceMarker}
};
use crate::time::{Hertz, U32Ext};
use crate::typelevel::Sealed;

use super::gclk::{GclkSource, GclkSourceMarker, GclkNum};
use super::gclk::{GclkNum, GclkSource, GclkSourceMarker};
use super::gclkio::NotGclkInput;
use super::rtc::*;

Expand Down
12 changes: 6 additions & 6 deletions hal/src/thumbv7em/clock/v2/presets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
/// - [`Dfll<OpenLoop>`][`super::dfll::Dfll`] (`48 MHz`)
/// - [`Gclk5<marker::Dfll>`][`super::gclk::Gclk5`] (`48 MHz / 24 -> 2 MHz`)
/// - [`Pclk<marker::Dpll0, marker::Gclk5>`][`super::pclk::Pclk`]
/// - [`Dpll0<PclkDriven<marker::Dpll0, marker::Gclk5>>`][`super::dpll::Dpll0`] (`2 MHz * 60 ->
/// 120 MHz`)
/// - [`Dpll0<PclkDriven<marker::Dpll0, marker::Gclk5>>`][`super::dpll::Dpll0`]
/// (`2 MHz * 60 -> 120 MHz`)
/// - [`Gclk0<marker::Dpll0>`][`super::gclk::Gclk0`] (`120 MHz`)
///
/// Input arguments for this macro can be retrieved by calling
Expand Down Expand Up @@ -52,8 +52,8 @@ macro_rules! clocking_preset_gclk0_120mhz_gclk5_2mhz {
/// - [`Dfll<OpenLoop>`][`super::dfll::Dfll`] (`48 MHz`)
/// - [`Gclk5<marker::Dfll>`][`super::gclk::Gclk5`] (`48 MHz / 24 -> 2 MHz`)
/// - [`Pclk<marker::Dpll0, marker::Gclk5>`][`super::pclk::Pclk`]
/// - [`Dpll0<PclkDriven<marker::Dpll0, marker::Gclk5>>`][`super::dpll::Dpll0`] (`2 MHz * 60 ->
/// 120 MHz`)
/// - [`Dpll0<PclkDriven<marker::Dpll0, marker::Gclk5>>`][`super::dpll::Dpll0`]
/// (`2 MHz * 60 -> 120 MHz`)
/// - [`Gclk0<marker::Dpll0>`][`super::gclk::Gclk0`] (`120 MHz`)
///
/// with configured external 32k crystal oscillator:
Expand Down Expand Up @@ -109,8 +109,8 @@ macro_rules! clocking_preset_gclk0_120mhz_gclk5_2mhz_gclk1_external_32khz {
/// - [`Dfll<OpenLoop>`][`super::dfll::Dfll`] (`48 MHz`)
/// - [`Gclk5<marker::Dfll>`][`super::gclk::Gclk5`] (`48 MHz / 24 -> 2 MHz`)
/// - [`Pclk<marker::Dpll0, marker::Gclk5>`][`super::pclk::Pclk`]
/// - [`Dpll0<PclkDriven<marker::Dpll0, marker::Gclk5>>`][`super::dpll::Dpll0`] (`2 MHz * 60 ->
/// 120 MHz`)
/// - [`Dpll0<PclkDriven<marker::Dpll0, marker::Gclk5>>`][`super::dpll::Dpll0`]
/// (`2 MHz * 60 -> 120 MHz`)
/// - [`Gclk0<marker::Dpll0>`][`super::gclk::Gclk0`] (`120 MHz`)
///
/// with internal, ultra low power 32k oscillator:
Expand Down
6 changes: 4 additions & 2 deletions hal/src/thumbv7em/clock/v2/xosc32k.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
//! - [`Enabled`]`<`[`Xosc32k`]`<`[`ClockMode`]`, _, _>>`: Xosc32k is being
//! powered by an external signal (1 pin)
//!
//! Signal outputs are independently controllable and also expressed as typestates
//! Signal outputs are independently controllable and also expressed as
//! typestates
//! - [`Enabled`]`<`[`Xosc32k`]`<_, `[`Active32k`]`, _>>`: Xosc32k 32 kHz signal
//! output is active
//! - [`Enabled`]`<`[`Xosc32k`]`<_, `[`Inactive32k`]`, _>>`: Xosc32k 32 kHz
Expand All @@ -24,7 +25,8 @@
//! - [`Enabled<Xosc32k>::activate_32k`]
//! - [`Enabled<Xosc32k>::activate_1k`]
//!
//! To construct a Xosc32k in a proper mode use an appropriate construction function:
//! To construct a Xosc32k in a proper mode use an appropriate construction
//! function:
//! - [`Xosc32k::from_clock`]
//! - [`Xosc32k::from_crystal`]
//! Then, enable it with a [`Xosc32k::enable`] function call
Expand Down

0 comments on commit bddd31f

Please sign in to comment.